Commit 675c847d authored by tfarina@chromium.org's avatar tfarina@chromium.org

Introduce GN to desktop_linux arg and grit_defines list.

They are necessary otherwise grit won't define IDS_WEB_FONT_FAMILY and
IDS_WEB_FONT_SIZE from app_locale_settings.grd

Which is necessary, otherwise we get the following error when trying to
compile web_ui_util.cc:

../../ui/base/webui/web_ui_util.cc:130:28: error: 'IDS_WEB_FONT_FAMILY'
was not declared in this scope
../../ui/base/webui/web_ui_util.cc:131:26: error: 'IDS_WEB_FONT_SIZE'
was not declared in this scope

BUG=367591
TEST=gn gen out/Debug_gn && ninja -C out/Debug_gn ui_base
R=brettw@chromium.org
TBR=ben (for ui/base change)

Review URL: https://codereview.chromium.org/296933017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274019 0039d316-1c4b-4281-b951-d872f2087c98
parent b3bf7416
...@@ -157,6 +157,8 @@ if (os == "win") { ...@@ -157,6 +157,8 @@ if (os == "win") {
is_win = false is_win = false
} }
is_desktop_linux = is_linux && !is_chromeos
# ============================================================================= # =============================================================================
# CPU ARCHITECTURE # CPU ARCHITECTURE
# ============================================================================= # =============================================================================
......
...@@ -12,6 +12,28 @@ ...@@ -12,6 +12,28 @@
# # You can also put deps here if the grit source depends on generated # # You can also put deps here if the grit source depends on generated
# # files. # # files.
# } # }
import ("//build/config/ui.gni")
grit_defines = []
if (is_chromeos) {
grit_defines += [
"-D", "chromeos",
"-D", "scale_factors=2x"
]
}
if (is_desktop_linux) {
grit_defines += [ "-D", "desktop_linux" ]
}
if (is_android) {
grit_defines += [
"-t", "android",
"-E", "ANDROID_JAVA_TAGGED_ONLY=true",
]
}
template("grit") { template("grit") {
assert(defined(invoker.source), assert(defined(invoker.source),
"\"source\" must be defined for the grit template $target_name") "\"source\" must be defined for the grit template $target_name")
...@@ -70,12 +92,11 @@ template("grit") { ...@@ -70,12 +92,11 @@ template("grit") {
source_prereqs = grit_inputs source_prereqs = grit_inputs
outputs = grit_outputs outputs = grit_outputs
# TODO(brettw) grit_defines.
args = [ args = [
"-i", source_path, "build", "-i", source_path, "build",
"-f", resource_ids, "-f", resource_ids,
"-o", output_dir, "-o", output_dir,
] + grit_flags ] + grit_defines + grit_flags
visibility = target_visibility visibility = target_visibility
} }
......
...@@ -216,11 +216,10 @@ component("base") { ...@@ -216,11 +216,10 @@ component("base") {
"ui_base_export.h", "ui_base_export.h",
"view_prop.cc", "view_prop.cc",
"view_prop.h", "view_prop.h",
# TODO(tfarina): Uncomment these when http://crbug.com/367591 is fixed.
"webui/jstemplate_builder.cc", "webui/jstemplate_builder.cc",
"webui/jstemplate_builder.h", "webui/jstemplate_builder.h",
#"webui/web_ui_util.cc", "webui/web_ui_util.cc",
#"webui/web_ui_util.h", "webui/web_ui_util.h",
"win/accessibility_ids_win.h", "win/accessibility_ids_win.h",
"win/accessibility_misc_utils.cc", "win/accessibility_misc_utils.cc",
"win/accessibility_misc_utils.h", "win/accessibility_misc_utils.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment