Skip to content

Commit

Permalink
Add chrome/browser/ui to the GN build.
Browse files Browse the repository at this point in the history
This moves the intermediate grit files:
ui/ui_resources -> ui/resources
ui/ui_strings -> ui/strings
in the GYP build to put it in line with the GN one (and also what one would expect).

R=ajwong@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282663 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed Jul 11, 2014
1 parent 055f8f2 commit a3c1343
Show file tree
Hide file tree
Showing 37 changed files with 632 additions and 60 deletions.
4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ group("root") {
#"//base(//build/toolchain/nacl:x86_newlib)",

"//cc",
"//chrome/browser",
"//chrome/browser/devtools",
"//chrome/browser/ui",
"//chrome/browser/ui/views",
"//chrome/common",
"//chrome/plugin",
Expand Down Expand Up @@ -140,7 +142,9 @@ group("root") {
if (is_android) {
deps -= [
"//cc",
"//chrome/browser", # Blocked on content.
"//chrome/browser/devtools", # Blocked on content.
"//chrome/browser/ui", # Blocked on content.
"//chrome/browser/ui/views", # Blocked on content.
"//chrome/common", # Blocked on content.
"//chrome/plugin", # Blocked on content.
Expand Down
4 changes: 2 additions & 2 deletions android_webview/android_webview.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
],
Expand Down Expand Up @@ -115,7 +115,7 @@
'include_dirs': [
'..',
'../skia/config',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/',
],
'sources': [
'browser/aw_browser_context.cc',
Expand Down
4 changes: 2 additions & 2 deletions apps/shell/app_shell.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
],
'pak_output': '<(PRODUCT_DIR)/app_shell.pak',
Expand Down
12 changes: 12 additions & 0 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# TODO(GYP) this is a placeholder so that targets that depend on ash can get
# the resources generated.
group("ash") {
deps = [
"//ash/resources",
"//ash/strings",
]
}
2 changes: 1 addition & 1 deletion ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@
['exclude', 'autoclick/autoclick_unittest.cc'],
],
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
Expand Down
1 change: 1 addition & 0 deletions ash/ash_strings.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
'targets': [
{
# GN version: //ash/strings
'target_name': 'ash_strings',
'type': 'none',
'variables': {
Expand Down
9 changes: 9 additions & 0 deletions ash/resources/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//tools/grit/grit_rule.gni")

grit("resources") {
source = "ash_resources.grd"
}
9 changes: 9 additions & 0 deletions ash/strings/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//tools/grit/grit_rule.gni")

grit("strings") {
source = "../ash_strings.grd"
}
4 changes: 3 additions & 1 deletion build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ config("feature_flags") {
# TODO(brettw) most of these need to be parameterized.
defines = [
"CHROMIUM_BUILD",
"ENABLE_ONE_CLICK_SIGNIN",
"ENABLE_NOTIFICATIONS",
"ENABLE_EGLIMAGE=1",
"ENABLE_BACKGROUND=1",
Expand Down Expand Up @@ -180,6 +179,9 @@ config("feature_flags") {
if (enable_google_now) {
defines += [ "ENABLE_GOOGLE_NOW=1" ]
}
if (enable_one_click_signin) {
defines += [ "ENABLE_ONE_CLICK_SIGNIN" ]
}
}

# Debug/release ----------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions build/config/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ declare_args() {

# Enables Native Client support.
enable_nacl = (!is_ios && !is_android)

# If debug_devtools is set to true, JavaScript files for DevTools are stored
# as is and loaded from disk. Otherwise, a concatenated file is stored in
# resources.pak. It is still possible to load JS files from disk by passing
# --debug-devtools cmdline switch.
debug_devtools = false
}

# Additional dependent variables -----------------------------------------------
Expand Down Expand Up @@ -144,3 +150,9 @@ enable_image_loader_extension = is_chromeos
enable_remoting = !is_ios && !is_android

enable_google_now = !is_ios && !is_android

enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos)

# Chrome OS: whether to also build the upcoming version of
# ChromeVox, which can then be enabled via a command-line switch.
enable_chromevox_next = false
4 changes: 2 additions & 2 deletions build/config/ui.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
declare_args() {
# Indicates if Ash is enabled. Ash is the Aura Shell which provides a
# desktop-like environment for Aura. Requires use_aura = true
use_ash = is_win || is_chromeos
use_ash = is_win || is_linux

# Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
# that does not require X11.
Expand All @@ -25,7 +25,7 @@ declare_args() {

# Indicates if Aura is enabled. Aura is a low-level windowing library, sort
# of a replacement for GDI or GTK.
use_aura = is_linux || use_ozone || is_win || is_chromeos || use_ash
use_aura = is_win || is_linux

# XInput2 multitouch support. Zero means disabled, nonzero indicates the
# minimum XI2 version. For example, use_xi2_mt=2 means XI2.2 or above.
Expand Down
2 changes: 1 addition & 1 deletion build/ui_resources_location.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
# Two facilitate the two-sided patch, this variable indicates the
# one currently in use.
# TODO(brettw) remove this when the move is complete.
'ui_resources_gen_subdir': 'ui_resources',
'ui_resources_gen_subdir': 'resources',
},
}
18 changes: 18 additions & 0 deletions chrome/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ group("extra_resources") {
"//chrome/browser/resources:sync_internals_resources",
"//chrome/browser/resources:translate_internals_resources",
]
if (!is_ios) {
deps += [
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources:options_resources",
"//chrome/browser/resources:quota_internals_resources",
"//chrome/browser/resources:sync_file_system_internals_resources",
]
}

if (enable_chromevox_next) {
deps += [
#'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2', TODO(GYP)
]
} else {
deps += [
#'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox', TODO(GYP)
]
}
}

# GYP version: chrome/chrome_resources.gyp:chrome_strings
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static_library("browser") {
# # These files are generated by GRIT.
# '<(grit_out_dir)/grit/component_extension_resources_map.cc',
# '<(grit_out_dir)/grit/theme_resources_map.cc',
# '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/grit/ui_resources_map.cc',
# '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
#
# # This file is generated by
# # chrome/browser/metrics/variations/generate_resources_map.py
Expand Down
23 changes: 23 additions & 0 deletions chrome/browser/resources/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,26 @@ grit("translate_internals_resources") {
source = "translate_internals_resources.grd"
}

# GYP version: copy command of chrome_extra_resources
copy("extension_resource_demo") {
sources = [ "extension_resource/demo/library.js" ]
outputs = [ "$root_out_dir/resources/extension/demo/library.js" ]
}

if (!is_ios) {
grit("component_extension_resources") {
source = "component_extension_resources.grd"
}

grit("options_resources") {
source = "options_resources.grd"
}

grit("quota_internals_resources") {
source = "quota_internals_resources.grd"
}

grit("sync_file_system_internals_resources") {
source = "sync_file_system_internals_resources.grd"
}
}
Loading

0 comments on commit a3c1343

Please sign in to comment.