chore: remove ELECTRON_GN_BUILD define
This commit is contained in:
parent
4b5cb7c548
commit
147d5f0dd9
2 changed files with 3 additions and 24 deletions
|
@ -18,7 +18,6 @@ static_library("brightray") {
|
||||||
|
|
||||||
defines = [
|
defines = [
|
||||||
"DISABLE_NACL=1",
|
"DISABLE_NACL=1",
|
||||||
"ELECTRON_GN_BUILD",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
|
|
|
@ -57,40 +57,20 @@ void LoadResourceBundle(const std::string& locale) {
|
||||||
PathService::Get(base::DIR_MODULE, &pak_dir);
|
PathService::Get(base::DIR_MODULE, &pak_dir);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ELECTRON_GN_BUILD)
|
|
||||||
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||||
locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
|
locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
|
||||||
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
|
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
|
||||||
bundle.ReloadLocaleResources(locale);
|
bundle.ReloadLocaleResources(locale);
|
||||||
bundle.AddDataPackFromPath(pak_dir.Append(FILE_PATH_LITERAL("resources.pak")),
|
bundle.AddDataPackFromPath(pak_dir.Append(FILE_PATH_LITERAL("resources.pak")),
|
||||||
ui::SCALE_FACTOR_NONE);
|
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)
|
#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(
|
bundle.AddDataPackFromPath(
|
||||||
pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")),
|
pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")),
|
||||||
ui::GetSupportedScaleFactors()[0]);
|
ui::GetSupportedScaleFactors()[0]);
|
||||||
#endif // defined(ENABLE_PDF_VIEWER)
|
#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() {}
|
MainDelegate::MainDelegate() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue