2013-11-07 20:02:35 +00:00
|
|
|
#ifndef BRIGHTRAY_BROWSER_LINUX_INSPECTABLE_WEB_CONTENTS_VIEW_LINUX_H_
|
|
|
|
#define BRIGHTRAY_BROWSER_LINUX_INSPECTABLE_WEB_CONTENTS_VIEW_LINUX_H_
|
|
|
|
|
|
|
|
#include "browser/inspectable_web_contents_view.h"
|
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
class InspectableWebContentsImpl;
|
|
|
|
|
|
|
|
class InspectableWebContentsViewLinux : public InspectableWebContentsView {
|
|
|
|
public:
|
|
|
|
InspectableWebContentsViewLinux(InspectableWebContentsImpl*);
|
|
|
|
~InspectableWebContentsViewLinux();
|
|
|
|
|
|
|
|
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
|
|
|
virtual void ShowDevTools() OVERRIDE;
|
|
|
|
virtual void CloseDevTools() OVERRIDE;
|
|
|
|
virtual bool SetDockSide(const std::string& side) OVERRIDE;
|
|
|
|
|
|
|
|
InspectableWebContentsImpl* inspectable_web_contents() { return inspectable_web_contents_; }
|
|
|
|
|
|
|
|
private:
|
2013-11-16 04:22:25 +00:00
|
|
|
// Show the dev tools in their own window. If they're already shown
|
|
|
|
// somewhere else, remove them cleanly and take any GtkPaned out of the
|
|
|
|
// window.
|
2013-11-15 20:23:52 +00:00
|
|
|
void ShowDevToolsInWindow();
|
|
|
|
|
2013-11-16 04:22:25 +00:00
|
|
|
// Show the dev tools in a vpaned (on the bottom) or hpaned (on the
|
|
|
|
// right). If they're already shown in a pane, move them and remove the
|
|
|
|
// old pane. If they're already shown in a window, hide (don't delete)
|
|
|
|
// that window.
|
2013-11-15 20:23:52 +00:00
|
|
|
void ShowDevToolsInPane(bool on_bottom);
|
|
|
|
|
2013-11-16 04:22:25 +00:00
|
|
|
// Create a new window for dev tools. This function doesn't actually
|
|
|
|
// put the dev tools in the window or show the window.
|
2013-11-15 20:23:52 +00:00
|
|
|
void MakeDevToolsWindow();
|
|
|
|
|
2013-11-16 04:22:25 +00:00
|
|
|
// Get the GtkWindow* that contains this object.
|
2013-11-15 20:23:52 +00:00
|
|
|
GtkWidget *GetBrowserWindow();
|
|
|
|
|
2013-11-16 04:22:25 +00:00
|
|
|
// Owns us.
|
|
|
|
InspectableWebContentsImpl* inspectable_web_contents_;
|
|
|
|
|
|
|
|
std::string dockside_;
|
|
|
|
GtkWidget *devtools_window_;
|
|
|
|
|
2013-11-07 20:02:35 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewLinux);
|
|
|
|
};
|
|
|
|
|
2013-11-17 23:20:17 +00:00
|
|
|
} // namespace brightray
|
2013-11-07 20:02:35 +00:00
|
|
|
|
|
|
|
#endif
|