2014-07-04 08:25:59 +00:00
|
|
|
#ifndef BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
|
|
|
|
#define BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
|
2013-11-07 20:02:35 +00:00
|
|
|
|
2014-07-02 12:59:51 +00:00
|
|
|
#include "browser/devtools_contents_resizing_strategy.h"
|
2013-11-07 20:02:35 +00:00
|
|
|
#include "browser/inspectable_web_contents_view.h"
|
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
2014-07-04 08:25:59 +00:00
|
|
|
#include "ui/views/view.h"
|
|
|
|
|
|
|
|
namespace views {
|
|
|
|
class WebView;
|
|
|
|
class Widget;
|
|
|
|
}
|
2013-11-07 20:02:35 +00:00
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
2015-08-07 09:00:49 +00:00
|
|
|
namespace {
|
|
|
|
class DevToolsWindowDelegate;
|
|
|
|
}
|
|
|
|
|
2013-11-07 20:02:35 +00:00
|
|
|
class InspectableWebContentsImpl;
|
|
|
|
|
2014-07-04 08:25:59 +00:00
|
|
|
class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
|
|
|
public views::View {
|
2013-11-17 23:52:02 +00:00
|
|
|
public:
|
2014-07-04 08:25:59 +00:00
|
|
|
explicit InspectableWebContentsViewViews(
|
2013-11-17 23:52:02 +00:00
|
|
|
InspectableWebContentsImpl* inspectable_web_contents_impl);
|
2014-07-04 08:25:59 +00:00
|
|
|
~InspectableWebContentsViewViews();
|
2013-11-07 20:02:35 +00:00
|
|
|
|
2015-08-07 09:00:49 +00:00
|
|
|
DevToolsWindowDelegate* GetDevToolsWindowDelegate() const {
|
|
|
|
return devtools_window_delegate_;
|
|
|
|
}
|
|
|
|
|
2014-07-04 08:25:59 +00:00
|
|
|
// InspectableWebContentsView:
|
2015-06-05 04:07:27 +00:00
|
|
|
views::View* GetView() override;
|
|
|
|
views::View* GetWebView() override;
|
|
|
|
void ShowDevTools() override;
|
|
|
|
void CloseDevTools() override;
|
|
|
|
bool IsDevToolsViewShowing() override;
|
2015-09-15 03:04:46 +00:00
|
|
|
bool IsDevToolsViewFocused() override;
|
2015-06-05 04:07:27 +00:00
|
|
|
void SetIsDocked(bool docked) override;
|
|
|
|
void SetContentsResizingStrategy(
|
2014-10-23 03:10:39 +00:00
|
|
|
const DevToolsContentsResizingStrategy& strategy) override;
|
2015-08-07 09:00:49 +00:00
|
|
|
void SetTitle(const base::string16& title) override;
|
2013-11-07 20:02:35 +00:00
|
|
|
|
2013-11-17 23:52:02 +00:00
|
|
|
InspectableWebContentsImpl* inspectable_web_contents() {
|
|
|
|
return inspectable_web_contents_;
|
|
|
|
}
|
2013-11-07 20:02:35 +00:00
|
|
|
|
2013-11-17 23:52:02 +00:00
|
|
|
private:
|
2014-07-04 08:25:59 +00:00
|
|
|
// views::View:
|
2015-06-05 04:07:27 +00:00
|
|
|
void Layout() override;
|
2014-07-04 08:25:59 +00:00
|
|
|
|
2013-11-16 04:22:25 +00:00
|
|
|
// Owns us.
|
|
|
|
InspectableWebContentsImpl* inspectable_web_contents_;
|
|
|
|
|
2014-07-04 12:26:59 +00:00
|
|
|
scoped_ptr<views::Widget> devtools_window_;
|
|
|
|
views::WebView* devtools_window_web_view_;
|
2014-07-04 08:25:59 +00:00
|
|
|
views::WebView* contents_web_view_;
|
|
|
|
views::WebView* devtools_web_view_;
|
|
|
|
|
2014-07-02 12:59:51 +00:00
|
|
|
DevToolsContentsResizingStrategy strategy_;
|
2014-07-04 12:26:59 +00:00
|
|
|
bool devtools_visible_;
|
2015-08-07 09:00:49 +00:00
|
|
|
DevToolsWindowDelegate* devtools_window_delegate_;
|
2013-11-16 04:22:25 +00:00
|
|
|
|
2014-07-04 08:25:59 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewViews);
|
2013-11-07 20:02:35 +00:00
|
|
|
};
|
|
|
|
|
2013-11-17 23:20:17 +00:00
|
|
|
} // namespace brightray
|
2013-11-07 20:02:35 +00:00
|
|
|
|
2014-07-04 08:25:59 +00:00
|
|
|
#endif // BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
|