1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
9 gypi_values = exec_script("//build/gypi_to_gn.py",
10 [ rebase_path("views.gyp") ],
15 sources = gypi_values.views_sources
17 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
18 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
20 defines = [ "VIEWS_IMPLEMENTATION" ]
24 "//base/third_party/dynamic_annotations",
36 "//ui/accessibility:ax_gen",
41 "//ui/events:events_base",
42 "//ui/events/platform",
47 if (use_x11 && !is_chromeos) {
48 deps += [ "//ui/display/util" ]
50 if (is_linux && !is_chromeos) {
51 sources -= [ "window/window_button_order_provider.cc" ]
52 deps += [ "//ui/shell_dialogs" ]
55 "linux_ui/linux_ui.cc",
56 "linux_ui/linux_ui.h",
57 "linux_ui/window_button_order_observer.h",
58 "linux_ui/window_button_order_provider.cc",
64 "linux_ui/status_icon_linux.cc",
65 "linux_ui/status_icon_linux.h",
70 sources += gypi_values.views_win_sources
76 ldflags = [ "/DELAYLOAD:user32.dll" ]
78 "//third_party/iaccessible2",
84 deps += [ "//ui/ozone" ]
88 "//build/config/linux:x11",
89 "//build/config/linux:xrandr",
92 "//ui/events/devices",
93 "//ui/events/platform/x11",
99 sources += gypi_values.views_aura_sources
102 "//ui/touch_selection",
106 sources += gypi_values.views_desktop_aura_sources
108 sources += gypi_values.views_desktop_aura_x11_sources
109 configs += [ "//build/config/linux:atk" ]
111 sources += gypi_values.views_desktop_aura_win_sources
112 } else if (use_ozone) {
113 sources += gypi_values.views_desktop_aura_ozone_sources
116 sources += gypi_values.views_desktop_aura_linux_sources
122 deps += [ "//ui/accelerated_widget_mac" ]
124 # Required by bridged_native_widget.mm.
125 "QuartzCore.framework",
130 static_library("test_support") {
132 sources = gypi_values.views_test_support_sources
139 "//ipc:test_support",
145 "//ui/compositor:test_support",
147 "//ui/events:events_base",
148 "//ui/events:test_support",
149 "//ui/events/platform",
155 sources += gypi_values.views_test_support_aura_sources
158 "//ui/aura:test_support",
161 if (use_x11 && !is_chromeos) {
162 sources += gypi_values.views_test_support_desktop_aura_x11_sources
166 deps += [ "//ui/gfx/x" ]
168 if (use_ozone || !use_x11) {
169 sources -= [ "test/x11_property_change_waiter.cc" ]
173 test("views_unittests") {
174 sources = gypi_values.views_unittests_sources
181 "//base/test:test_support",
185 "//ui/accessibility",
188 "//ui/base:test_support",
189 "//ui/compositor:test_support",
190 "//ui/events:test_support",
191 "//ui/events:events_base",
192 "//ui/events/platform",
203 "//third_party/iaccessible2",
214 # 'VCManifestTool': {
215 # 'AdditionalManifestFiles': [
216 # '$(ProjectDir)\\test\\views_unittest.manifest',
224 "//build/config/linux:x11",
225 "//build/config/linux:xext",
228 "//ui/events/devices",
229 "//ui/events/platform/x11",
235 sources += gypi_values.views_unittests_aura_sources
238 "//ui/aura:test_support",
239 "//ui/touch_selection",
243 sources += gypi_values.views_unittests_desktop_aura_sources
245 sources += gypi_values.views_unittests_desktop_aurax11_sources
250 sources += gypi_values.views_unittests_desktop_sources
254 "//ui/events/platform/x11",
260 # views_unittests not yet compiling on Mac. http://crbug.com/378134
262 "bubble/bubble_window_targeter_unittest.cc",
263 "controls/button/custom_button_unittest.cc",
264 "controls/button/menu_button_unittest.cc",
265 "controls/menu/menu_controller_unittest.cc",
266 "controls/native/native_view_host_unittest.cc",
267 "focus/focus_manager_unittest.cc",
268 "ime/input_method_bridge_unittest.cc",
269 "widget/widget_unittest.cc",
270 "widget/window_reorderer_unittest.cc",
276 test("macviews_interactive_ui_tests") {
278 "cocoa/bridged_native_widget_interactive_uitest.mm",
279 "run_all_unittests.cc",
280 "widget/native_widget_mac_interactive_uitest.mm",
286 "//base/test:test_support",
289 "//ui/base:test_support",
292 "//ui/resources:ui_test_pak",