From 1a1fecf42394682d608d90841ad9e4a162157c92 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Thu, 28 Mar 2013 17:16:35 -0400 Subject: [PATCH] Bump the base SDK and deployment target to 10.8 This required working around an incompatibility in base/mac/foundation_util.h. --- brightray/brightray.gyp | 1 + brightray/brightray.gypi | 4 ++-- brightray/browser/browser_main_parts_mac.mm | 2 +- brightray/common/application_name_mac.mm | 3 +-- brightray/common/mac/foundation_util.h | 15 +++++++++++++++ brightray/common/mac/main_application_bundle.mm | 3 ++- brightray/common/main_delegate_mac.mm | 2 +- 7 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 brightray/common/mac/foundation_util.h diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index 95ffe02810cb..8e53f38dde75 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -48,6 +48,7 @@ 'common/application_name_mac.mm', 'common/content_client.cc', 'common/content_client.h', + 'common/mac/foundation_util.h', 'common/mac/main_application_bundle.h', 'common/mac/main_application_bundle.mm', 'common/main_delegate.cc', diff --git a/brightray/brightray.gypi b/brightray/brightray.gypi index 7014dd6cbf93..4245e8c6aa06 100644 --- a/brightray/brightray.gypi +++ b/brightray/brightray.gypi @@ -4,8 +4,8 @@ 'libchromiumcontent_library_dir': '<(libchromiumcontent_dir)/Release', 'libchromiumcontent_include_dir': '<(libchromiumcontent_dir)/include', 'libchromiumcontent_resources_dir': '<(libchromiumcontent_library_dir)', - 'mac_deployment_target%': '10.7', - 'mac_sdkroot%': 'macosx10.7', + 'mac_deployment_target%': '10.8', + 'mac_sdkroot%': 'macosx', }, 'target_defaults': { 'defines': [ diff --git a/brightray/browser/browser_main_parts_mac.mm b/brightray/browser/browser_main_parts_mac.mm index c3fb162fe1b0..373280ca4441 100644 --- a/brightray/browser/browser_main_parts_mac.mm +++ b/brightray/browser/browser_main_parts_mac.mm @@ -14,7 +14,7 @@ void BrowserMainParts::PreMainMessageLoopStart() { NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"]; auto mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:base::mac::FrameworkBundle()]; - [mainNib instantiateNibWithOwner:application topLevelObjects:nil]; + [mainNib instantiateWithOwner:application topLevelObjects:nil]; [mainNib release]; } diff --git a/brightray/common/application_name_mac.mm b/brightray/common/application_name_mac.mm index eecccefd3fa5..6a781189c3dc 100644 --- a/brightray/common/application_name_mac.mm +++ b/brightray/common/application_name_mac.mm @@ -1,9 +1,8 @@ #import "common/application_name.h" +#import "common/mac/foundation_util.h" #import "common/mac/main_application_bundle.h" -#import "base/mac/foundation_util.h" - namespace brightray { std::string GetApplicationName() { diff --git a/brightray/common/mac/foundation_util.h b/brightray/common/mac/foundation_util.h new file mode 100644 index 000000000000..509c635b04f7 --- /dev/null +++ b/brightray/common/mac/foundation_util.h @@ -0,0 +1,15 @@ +#ifndef BRIGHTRAY_COMMON_MAC_FOUNDATION_UTIL_H_ +#define BRIGHTRAY_COMMON_MAC_FOUNDATION_UTIL_H_ + +// This header exists to work around incompatibilities between +// base/mac/foundation_util.h and the 10.8 SDK. + +#import + +// base/mac/foundation_util.h contains an incompatible declaration of NSSearchPathDirectory, +// so here we #define it to be something else. +#define NSSearchPathDirectory NSSearchPathDirectory___PRE_10_8 +#import "base/mac/foundation_util.h" +#undef NSSearchPathDirectory + +#endif diff --git a/brightray/common/mac/main_application_bundle.mm b/brightray/common/mac/main_application_bundle.mm index 14173241e8f2..730eb36207b6 100644 --- a/brightray/common/mac/main_application_bundle.mm +++ b/brightray/common/mac/main_application_bundle.mm @@ -5,8 +5,9 @@ #import "common/mac/main_application_bundle.h" +#import "common/mac/foundation_util.h" + #import "base/files/file_path.h" -#import "base/mac/foundation_util.h" #import "base/path_service.h" namespace brightray { diff --git a/brightray/common/main_delegate_mac.mm b/brightray/common/main_delegate_mac.mm index ec04e0f17028..e676402f8899 100644 --- a/brightray/common/main_delegate_mac.mm +++ b/brightray/common/main_delegate_mac.mm @@ -6,10 +6,10 @@ #import "main_delegate.h" #include "common/application_name.h" +#include "common/mac/foundation_util.h" #include "common/mac/main_application_bundle.h" #include "base/mac/bundle_locations.h" -#include "base/mac/foundation_util.h" #include "base/path_service.h" #include "content/public/common/content_paths.h" #include "ui/base/resource/resource_bundle.h"