From 147d5f0dd93e905cfab68a0b44cffc995c909bca Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 12 Sep 2018 11:46:42 -0700 Subject: [PATCH 1/2] chore: remove ELECTRON_GN_BUILD define --- brightray/BUILD.gn | 1 - brightray/common/main_delegate.cc | 26 +++----------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/brightray/BUILD.gn b/brightray/BUILD.gn index 38081f7beac33..91499d91c61b1 100644 --- a/brightray/BUILD.gn +++ b/brightray/BUILD.gn @@ -18,7 +18,6 @@ static_library("brightray") { defines = [ "DISABLE_NACL=1", - "ELECTRON_GN_BUILD", ] if (is_linux) { diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index c25cb5f0c02e6..5a4ac56beed37 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -57,40 +57,20 @@ void LoadResourceBundle(const std::string& locale) { PathService::Get(base::DIR_MODULE, &pak_dir); #endif -#if defined(ELECTRON_GN_BUILD) ui::ResourceBundle::InitSharedInstanceWithLocale( locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES); ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); bundle.ReloadLocaleResources(locale); bundle.AddDataPackFromPath(pak_dir.Append(FILE_PATH_LITERAL("resources.pak")), ui::SCALE_FACTOR_NONE); -#else - ui::ResourceBundle::InitSharedInstanceWithLocale( - locale, nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); - ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); - bundle.ReloadLocaleResources(locale); - - bundle.AddDataPackFromPath( - pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")), - ui::GetSupportedScaleFactors()[0]); #if defined(ENABLE_PDF_VIEWER) + NOTIMPLEMENTED() << "Hi, whoever's fixing PDF support! Thanks! The pdf viewer " + "resources haven't been ported over to the GN build yet, so you'll " + "probably need to change this bit of code."; 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); - bundle.AddDataPackFromPath( - pak_dir.Append(FILE_PATH_LITERAL("content_resources_200_percent.pak")), - ui::SCALE_FACTOR_200P); - bundle.AddDataPackFromPath( - pak_dir.Append(FILE_PATH_LITERAL("ui_resources_200_percent.pak")), - ui::SCALE_FACTOR_200P); - bundle.AddDataPackFromPath( - pak_dir.Append(FILE_PATH_LITERAL("views_resources_200_percent.pak")), - ui::SCALE_FACTOR_200P); -#endif } MainDelegate::MainDelegate() {} From 784c06c7841580cae6ae5737118ac08108b7ef2d Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 12 Sep 2018 12:09:41 -0700 Subject: [PATCH 2/2] chore: remove unsupported DISABLE_NACL define --- brightray/BUILD.gn | 4 ---- brightray/common/main_delegate.cc | 3 --- 2 files changed, 7 deletions(-) diff --git a/brightray/BUILD.gn b/brightray/BUILD.gn index 91499d91c61b1..c83a61231e880 100644 --- a/brightray/BUILD.gn +++ b/brightray/BUILD.gn @@ -16,10 +16,6 @@ static_library("brightray") { include_dirs = [ ".." ] - defines = [ - "DISABLE_NACL=1", - ] - if (is_linux) { deps += [ "//build/config/linux/gtk" ] } diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index 5a4ac56beed37..b1930463c7f91 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -30,9 +30,6 @@ bool SubprocessNeedsResourceBundle(const std::string& process_type) { #if defined(OS_MACOSX) // Mac needs them too for scrollbar related images and for sandbox // profiles. -#if !defined(DISABLE_NACL) - process_type == switches::kNaClLoaderProcess || -#endif process_type == switches::kPpapiPluginProcess || process_type == switches::kPpapiBrokerProcess || process_type == switches::kGpuProcess ||