diff --git a/brightray/.gitignore b/brightray/.gitignore index 4ee8ba8eacf3..3f04a5e2f1b3 100644 --- a/brightray/.gitignore +++ b/brightray/.gitignore @@ -7,3 +7,9 @@ # Vim *.swp + +# Linux +Makefile +*.Makefile +*.mk +out/ diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index b576b273ec75..7b5f88a3e988 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -46,6 +46,8 @@ 'browser/inspectable_web_contents_view.h', 'browser/inspectable_web_contents_view_mac.h', 'browser/inspectable_web_contents_view_mac.mm', + 'browser/linux/inspectable_web_contents_view_linux.h', + 'browser/linux/inspectable_web_contents_view_linux.cc', 'browser/mac/bry_application.h', 'browser/mac/bry_application.mm', 'browser/mac/bry_inspectable_web_contents_view.h', @@ -79,6 +81,16 @@ 'common/main_delegate_mac.mm', ], 'conditions': [ + ['OS=="linux"', { + 'cflags': [ + '-fno-rtti', + ], + 'link_settings': { + 'libraries': [ + '<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumcontent.so', + ], + }, + }], ['OS=="mac"', { 'link_settings': { 'libraries': [ diff --git a/brightray/browser/linux/inspectable_web_contents_view_linux.cc b/brightray/browser/linux/inspectable_web_contents_view_linux.cc new file mode 100644 index 000000000000..2eda56fa33ce --- /dev/null +++ b/brightray/browser/linux/inspectable_web_contents_view_linux.cc @@ -0,0 +1,47 @@ +#include "inspectable_web_contents_view_linux.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) { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::InspectableWebContentsViewLinux\n"); +} + +InspectableWebContentsViewLinux::~InspectableWebContentsViewLinux() { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::~InspectableWebContentsViewLinux\n"); +} + +gfx::NativeView InspectableWebContentsViewLinux::GetNativeView() const { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::~GetNativeView\n"); + return NULL; +} + +void InspectableWebContentsViewLinux::ShowDevTools() { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::ShowDevTools\n"); +} + +void InspectableWebContentsViewLinux::CloseDevTools() { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::CloseDevTools\n"); +} + +bool InspectableWebContentsViewLinux::SetDockSide(const std::string& side) { + // TODO + fprintf(stderr, "InspectableWebContentsViewLinux::SetDockSide\n"); + return false; +} + +} diff --git a/brightray/browser/linux/inspectable_web_contents_view_linux.h b/brightray/browser/linux/inspectable_web_contents_view_linux.h new file mode 100644 index 000000000000..832481a05728 --- /dev/null +++ b/brightray/browser/linux/inspectable_web_contents_view_linux.h @@ -0,0 +1,33 @@ +#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: + // Owns us. + InspectableWebContentsImpl* inspectable_web_contents_; + + DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewLinux); +}; + +} + +#endif