WIP: builds (but displys nothing) on Linux

This commit is contained in:
Patrick Reynolds 2013-11-07 14:02:35 -06:00
parent 1161da6527
commit 04b9bd21f8
4 changed files with 98 additions and 0 deletions

View file

@ -7,3 +7,9 @@
# Vim
*.swp
# Linux
Makefile
*.Makefile
*.mk
out/

View file

@ -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': [

View file

@ -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;
}
}

View file

@ -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