views: Initial docked devtools implementation.
This commit is contained in:
parent
4048d491f0
commit
e574bf6d0f
5 changed files with 138 additions and 56 deletions
|
@ -1,46 +0,0 @@
|
|||
#include "browser/linux/inspectable_web_contents_view_linux.h"
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "browser/browser_client.h"
|
||||
#include "browser/inspectable_web_contents_impl.h"
|
||||
|
||||
#include "content/public/browser/web_contents_view.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
InspectableWebContentsView* CreateInspectableContentsView(
|
||||
InspectableWebContentsImpl* inspectable_web_contents) {
|
||||
return new InspectableWebContentsViewLinux(inspectable_web_contents);
|
||||
}
|
||||
|
||||
InspectableWebContentsViewLinux::InspectableWebContentsViewLinux(
|
||||
InspectableWebContentsImpl* inspectable_web_contents)
|
||||
: inspectable_web_contents_(inspectable_web_contents) {
|
||||
}
|
||||
|
||||
InspectableWebContentsViewLinux::~InspectableWebContentsViewLinux() {
|
||||
}
|
||||
|
||||
gfx::NativeView InspectableWebContentsViewLinux::GetNativeView() const {
|
||||
auto web_contents = inspectable_web_contents_->GetWebContents();
|
||||
return web_contents->GetView()->GetNativeView();
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewLinux::ShowDevTools() {
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewLinux::CloseDevTools() {
|
||||
}
|
||||
|
||||
bool InspectableWebContentsViewLinux::IsDevToolsViewShowing() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewLinux::SetIsDocked(bool docked) {
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewLinux::SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) {
|
||||
}
|
||||
|
||||
} // namespace brightray
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef BRIGHTRAY_BROWSER_LINUX_INSPECTABLE_WEB_CONTENTS_VIEW_LINUX_H_
|
||||
#define BRIGHTRAY_BROWSER_LINUX_INSPECTABLE_WEB_CONTENTS_VIEW_LINUX_H_
|
||||
|
||||
#include "browser/devtools_contents_resizing_strategy.h"
|
||||
#include "browser/inspectable_web_contents_view.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
class InspectableWebContentsImpl;
|
||||
|
||||
class InspectableWebContentsViewLinux : public InspectableWebContentsView {
|
||||
public:
|
||||
explicit InspectableWebContentsViewLinux(
|
||||
InspectableWebContentsImpl* inspectable_web_contents_impl);
|
||||
~InspectableWebContentsViewLinux();
|
||||
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual void ShowDevTools() OVERRIDE;
|
||||
virtual void CloseDevTools() OVERRIDE;
|
||||
virtual bool IsDevToolsViewShowing() OVERRIDE;
|
||||
virtual void SetIsDocked(bool docked) OVERRIDE;
|
||||
virtual void SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) OVERRIDE;
|
||||
|
||||
InspectableWebContentsImpl* inspectable_web_contents() {
|
||||
return inspectable_web_contents_;
|
||||
}
|
||||
|
||||
private:
|
||||
// Owns us.
|
||||
InspectableWebContentsImpl* inspectable_web_contents_;
|
||||
|
||||
DevToolsContentsResizingStrategy strategy_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewLinux);
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue