address review comments
This commit is contained in:
parent
26081d5a11
commit
80de70bf66
3 changed files with 10 additions and 6 deletions
|
@ -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',
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue