diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index 19d92f76d15..10a25191d12 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -100,6 +100,9 @@ '<(libchromiumcontent_dir)/librenderer.a', '<(libchromiumcontent_dir)/libsecurity_state.a', # Friends of libpdf.a: + # On Linux we have to use "--whole-archive" to include + # all symbols, otherwise there will be plenty of + # unresolved symbols errors. '-Wl,--whole-archive', '<(libchromiumcontent_dir)/libpdf.a', '<(libchromiumcontent_dir)/libppapi_cpp_objects.a', diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index f14415e681d..3645f53f478 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -52,11 +52,12 @@ void InitializeResourceBundle(const std::string& locale) { #if defined(OS_MACOSX) LoadCommonResources(); #else - base::FilePath path, pak_dir; + base::FilePath pak_dir; ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); PathService::Get(base::DIR_MODULE, &pak_dir); - path = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); - bundle.AddDataPackFromPath(path, ui::GetSupportedScaleFactors()[0]); + bundle.AddDataPackFromPath( + pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")), + ui::GetSupportedScaleFactors()[0]); bundle.AddDataPackFromPath( pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")), ui::GetSupportedScaleFactors()[0]); diff --git a/brightray/common/main_delegate_mac.mm b/brightray/common/main_delegate_mac.mm index 191b39ff6a1..29040840ce3 100644 --- a/brightray/common/main_delegate_mac.mm +++ b/brightray/common/main_delegate_mac.mm @@ -26,13 +26,13 @@ base::FilePath GetFrameworksPath() { return MainApplicationBundlePath().Append("Contents").Append("Frameworks"); } -} - base::FilePath GetResourcesPakFilePath(NSString* name) { auto path = [base::mac::FrameworkBundle() pathForResource:name ofType:@"pak"]; return base::mac::NSStringToFilePath(path); } +} // namespace + void LoadCommonResources() { ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); bundle.AddDataPackFromPath(GetResourcesPakFilePath(@"content_shell"), @@ -56,4 +56,4 @@ void MainDelegate::OverrideChildProcessPath() { PathService::Override(content::CHILD_PROCESS_EXE, helper_path); } -} +} // namespace brightray