load pdf resource pak file

This commit is contained in:
deepak1556 2017-01-17 20:25:28 +05:30
parent 28f96f32f9
commit 2b4948d6aa
3 changed files with 18 additions and 10 deletions

View file

@ -49,18 +49,17 @@ void InitializeResourceBundle(const std::string& locale) {
locale, nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
// Load other resource files.
base::FilePath path;
#if defined(OS_MACOSX)
path = GetResourcesPakFilePath();
LoadCommonResources();
#else
base::FilePath pak_dir;
base::FilePath path, 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"));
#endif
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
bundle.AddDataPackFromPath(path, ui::GetSupportedScaleFactors()[0]);
#if !defined(OS_MACOSX)
bundle.AddDataPackFromPath(
pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")),
ui::GetSupportedScaleFactors()[0]);
bundle.AddDataPackFromPath(
pak_dir.Append(FILE_PATH_LITERAL("blink_image_resources_200_percent.pak")),
ui::SCALE_FACTOR_200P);