From 12d01e4fd58aee3947f7c49c67319a4a92516ad2 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Tue, 21 May 2013 11:39:25 -0400 Subject: [PATCH] ifdef out a bunch of Mac-specific code This is a hacky solution but helps us deal with other compiler/linker errors. --- brightray/browser/browser_client.cc | 2 ++ brightray/browser/inspectable_web_contents_impl.cc | 2 ++ brightray/common/main_delegate.cc | 2 +- brightray/common/main_delegate.h | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/brightray/browser/browser_client.cc b/brightray/browser/browser_client.cc index 9dc99f18a3b9..72626a5226b2 100644 --- a/brightray/browser/browser_client.cc +++ b/brightray/browser/browser_client.cc @@ -34,8 +34,10 @@ BrowserContext* BrowserClient::browser_context() { } NotificationPresenter* BrowserClient::notification_presenter() { +#if defined(OS_MACOSX) if (!notification_presenter_) notification_presenter_.reset(NotificationPresenter::Create()); +#endif return notification_presenter_.get(); } diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 7f694ad54ff5..c6c6f00f4cd5 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -41,7 +41,9 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(content::WebContents* web auto context = static_cast(web_contents_->GetBrowserContext()); dock_side_ = context->prefs()->GetString(kDockSidePref); +#if defined(OS_MACOSX) view_.reset(CreateInspectableContentsView(this)); +#endif } InspectableWebContentsImpl::~InspectableWebContentsImpl() { diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index 7c1fa903bcb5..09cc8bc10384 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -32,8 +32,8 @@ void MainDelegate::PreSandboxStartup() { #if defined(OS_MACOSX) OverrideChildProcessPath(); OverrideFrameworkBundlePath(); -#endif InitializeResourceBundle(); +#endif } } diff --git a/brightray/common/main_delegate.h b/brightray/common/main_delegate.h index 34ebfef9d7fe..b695c7c326cd 100644 --- a/brightray/common/main_delegate.h +++ b/brightray/common/main_delegate.h @@ -34,8 +34,8 @@ protected: virtual void PreSandboxStartup() OVERRIDE; private: - void InitializeResourceBundle(); #if defined(OS_MACOSX) + void InitializeResourceBundle(); static void OverrideChildProcessPath(); static void OverrideFrameworkBundlePath(); #endif