summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@chromium.org>2015-06-17 03:06:23 -0400
committerSadrul Habib Chowdhury <sadrul@chromium.org>2015-06-17 07:07:54 +0000
commitc13fc9ff0aedca62ebfdfc27d44c6b5ac204c9d8 (patch)
treeb63742b7b3bae9feb72e45134384322813bc1312 /ui
parentbb3d972d5787ed3d6e9116ddc1c4a20a1a5de30c (diff)
downloadchromium_src-c13fc9ff0aedca62ebfdfc27d44c6b5ac204c9d8.zip
chromium_src-c13fc9ff0aedca62ebfdfc27d44c6b5ac204c9d8.tar.gz
chromium_src-c13fc9ff0aedca62ebfdfc27d44c6b5ac204c9d8.tar.bz2
views: Move TOOLKIT_VIEWS definition in //ui/views/ from root.
If 'toolkit_views' gyp/gn flag is toggled, then it shouldn't cause targets that do not depend on views to be rebuilt. To make this happen, remove the definition of the TOOLKIT_VIEWS flag from the top-level config into a config in views, so that only targets that explicitly depend on views get the define, and are affected by the switch. BUG=500004 R=ben@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/1175603002. Cr-Commit-Position: refs/heads/master@{#334785}
Diffstat (limited to 'ui')
-rw-r--r--ui/app_list/BUILD.gn4
-rw-r--r--ui/app_list/app_list.gyp3
-rw-r--r--ui/gfx/native_widget_types.h2
-rw-r--r--ui/views/BUILD.gn5
-rw-r--r--ui/views/views.gyp5
5 files changed, 19 insertions, 0 deletions
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn
index 8a1634f..680dcca 100644
--- a/ui/app_list/BUILD.gn
+++ b/ui/app_list/BUILD.gn
@@ -171,6 +171,10 @@ component("app_list") {
"//ui/events",
"//ui/views",
]
+
+ public_deps = [
+ "//ui/views",
+ ]
}
if (is_mac) {
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 1efa03f..1ea28b1 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -195,6 +195,9 @@
'../events/events.gyp:events',
'../views/views.gyp:views',
],
+ 'export_dependent_settings': [
+ '../views/views.gyp:views',
+ ],
}, { # toolkit_views==0
'sources/': [
['exclude', 'views/'],
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index f9811f9..0ce333c 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -135,6 +135,8 @@ typedef void* NativeCursor;
typedef ui::ViewAndroid* NativeView;
typedef ui::WindowAndroid* NativeWindow;
typedef jobject NativeEvent;
+#else
+#error Unknown build environment.
#endif
#if defined(OS_WIN)
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 2769a11..37a35e8 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -11,7 +11,12 @@ gypi_values = exec_script("//build/gypi_to_gn.py",
"scope",
[ "views.gyp" ])
+config("flags") {
+ defines = [ "TOOLKIT_VIEWS=1" ]
+}
+
component("views") {
+ all_dependent_configs = [ ":flags" ]
sources = gypi_values.views_sources
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 319667e..40d7b0f 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -622,6 +622,11 @@
'../resources/ui_resources.gyp:ui_resources',
'../strings/ui_strings.gyp:ui_strings',
],
+ 'all_dependent_settings': {
+ 'defines': [
+ 'TOOLKIT_VIEWS=1',
+ ],
+ },
'export_dependent_settings': [
'../accessibility/accessibility.gyp:ax_gen',
],