Browse Source

ifdef out a bunch of Mac-specific code

This is a hacky solution but helps us deal with other compiler/linker errors.
Adam Roben 12 years ago
parent
commit
12d01e4fd5

+ 2 - 0
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();
 }
 

+ 2 - 0
brightray/browser/inspectable_web_contents_impl.cc

@@ -41,7 +41,9 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(content::WebContents* web
   auto context = static_cast<BrowserContext*>(web_contents_->GetBrowserContext());
   dock_side_ = context->prefs()->GetString(kDockSidePref);
 
+#if defined(OS_MACOSX)
   view_.reset(CreateInspectableContentsView(this));
+#endif
 }
 
 InspectableWebContentsImpl::~InspectableWebContentsImpl() {

+ 1 - 1
brightray/common/main_delegate.cc

@@ -32,8 +32,8 @@ void MainDelegate::PreSandboxStartup() {
 #if defined(OS_MACOSX)
   OverrideChildProcessPath();
   OverrideFrameworkBundlePath();
-#endif
   InitializeResourceBundle();
+#endif
 }
 
 }

+ 1 - 1
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