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 {
|
|
|
|
|
|
|
|
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
|
|
|
|
2014-07-04 08:25:59 +00:00
|
|
|
// InspectableWebContentsView:
|
|
|
|
virtual views::View* GetView() OVERRIDE;
|
|
|
|
virtual views::View* GetWebView() OVERRIDE;
|
2013-11-07 20:02:35 +00:00
|
|
|
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
|
|
|
virtual void ShowDevTools() OVERRIDE;
|
|
|
|
virtual void CloseDevTools() OVERRIDE;
|
2013-12-09 12:34:44 +00:00
|
|
|
virtual bool IsDevToolsViewShowing() OVERRIDE;
|
2014-07-02 12:59:51 +00:00
|
|
|
virtual void SetIsDocked(bool docked) OVERRIDE;
|
|
|
|
virtual void SetContentsResizingStrategy(
|
|
|
|
const DevToolsContentsResizingStrategy& strategy) 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:
|
|
|
|
virtual void Layout() OVERRIDE;
|
|
|
|
|
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_;
|
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_
|