diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index fd4493655..10afe35ea 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -62,9 +62,11 @@ void LoadResourceBundle(const std::string& locale) { bundle.AddDataPackFromPath( pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")), ui::GetSupportedScaleFactors()[0]); +#if defined(ENABLE_PDF_VIEWER) bundle.AddDataPackFromPath( pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")), ui::GetSupportedScaleFactors()[0]); +#endif // defined(ENABLE_PDF_VIEWER) bundle.AddDataPackFromPath(pak_dir.Append(FILE_PATH_LITERAL( "blink_image_resources_200_percent.pak")), ui::SCALE_FACTOR_200P); diff --git a/brightray/common/main_delegate_mac.mm b/brightray/common/main_delegate_mac.mm index 99c449878..a44fc5bfd 100644 --- a/brightray/common/main_delegate_mac.mm +++ b/brightray/common/main_delegate_mac.mm @@ -36,8 +36,10 @@ void LoadCommonResources() { ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); bundle.AddDataPackFromPath(GetResourcesPakFilePath(@"content_shell"), ui::GetSupportedScaleFactors()[0]); +#if defined(ENABLE_PDF_VIEWER) bundle.AddDataPackFromPath(GetResourcesPakFilePath(@"pdf_viewer_resources"), ui::GetSupportedScaleFactors()[0]); +#endif // defined(ENABLE_PDF_VIEWER) } void MainDelegate::OverrideFrameworkBundlePath() { diff --git a/features.gypi b/features.gypi index 4e5c27657..405b37c8e 100644 --- a/features.gypi +++ b/features.gypi @@ -3,7 +3,7 @@ 'variables': { 'variables': { 'enable_osr%': 0, # FIXME(alexeykuzmin) - 'enable_pdf_viewer%': 1, + 'enable_pdf_viewer%': 0, # FIXME(deepak1556) 'enable_run_as_node%': 1, }, 'enable_osr%': '<(enable_osr)', diff --git a/filenames.gypi b/filenames.gypi index b92e405dc..bb6c40215 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -649,8 +649,6 @@ 'chromium_src/library_loaders/libspeechd.h', '<@(native_mate_files)', '<(SHARED_INTERMEDIATE_DIR)/atom_natives.h', - '<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.cc', - '<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.h', ], 'lib_sources_linux': [ 'chromium_src/chrome/browser/icon_loader_auralinux.cc', @@ -734,6 +732,8 @@ 'atom/browser/ui/webui/pdf_viewer_ui.h', 'chromium_src/components/pdf/renderer/pepper_pdf_host.cc', 'chromium_src/components/pdf/renderer/pepper_pdf_host.h', + '<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.cc', + '<(SHARED_INTERMEDIATE_DIR)/grit/pdf_viewer_resources_map.h', ], }], # enable_pdf_viewer ['enable_run_as_node==1', {