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",
38 "//ui/accessibility:ax_gen",
43 "//ui/events:events_base",
44 "//ui/events/platform",
49 if (use_x11 && !is_chromeos) {
50 deps += [ "//ui/display/util" ]
52 if (is_linux && !is_chromeos) {
53 sources -= [ "window/window_button_order_provider.cc" ]
54 deps += [ "//ui/shell_dialogs" ]
57 "linux_ui/linux_ui.cc",
58 "linux_ui/linux_ui.h",
59 "linux_ui/window_button_order_observer.h",
60 "linux_ui/window_button_order_provider.cc",
66 "linux_ui/status_icon_linux.cc",
67 "linux_ui/status_icon_linux.h",
72 sources += gypi_values.views_win_sources
77 ldflags = [ "/DELAYLOAD:user32.dll" ]
79 "//third_party/iaccessible2",
85 deps += [ "//ui/ozone" ]
89 "//build/config/linux:x11",
90 "//build/config/linux:xrandr",
93 "//ui/events/devices",
94 "//ui/events/platform/x11",
100 sources += gypi_values.views_aura_sources
102 sources += gypi_values.views_desktop_aura_sources
104 sources += gypi_values.views_desktop_aura_x11_sources
106 sources += gypi_values.views_desktop_aura_win_sources
107 } else if (use_ozone) {
108 sources += gypi_values.views_desktop_aura_ozone_sources
111 sources += gypi_values.views_desktop_aura_linux_sources
117 deps += [ "//ui/accelerated_widget_mac" ]
121 static_library("test_support") {
123 sources = gypi_values.views_test_support_sources
130 "//ipc:test_support",
137 "//ui/compositor:test_support",
139 "//ui/events:events_base",
140 "//ui/events:test_support",
141 "//ui/events/platform",
147 if (is_chromeos || !use_x11) {
149 "test/ui_controls_factory_desktop_aurax11.cc",
150 "test/ui_controls_factory_desktop_aurax11.h",
154 sources += gypi_values.views_test_support_aura_sources
155 deps += [ "//ui/aura:test_support" ]
158 deps += [ "//ui/gfx/x" ]
160 if (use_ozone || !use_x11) {
161 sources -= [ "test/x11_property_change_waiter.cc" ]
165 if (!is_win || link_chrome_on_windows) {
166 test("views_unittests") {
167 sources = gypi_values.views_unittests_sources
174 "//base/test:test_support",
178 "//ui/accessibility",
182 "//ui/base:test_support",
183 "//ui/compositor:test_support",
184 "//ui/events:test_support",
185 "//ui/events:events_base",
186 "//ui/events/platform",
197 sources -= [ "ime/input_method_bridge_unittest.cc" ]
202 "//third_party/iaccessible2",
213 # 'VCManifestTool': {
214 # 'AdditionalManifestFiles': [
215 # '$(ProjectDir)\\test\\views_unittest.manifest',
223 "//build/config/linux:x11",
224 "//build/config/linux:xext",
227 "//ui/events/devices",
228 "//ui/events/platform/x11",
234 sources += gypi_values.views_unittests_aura_sources
235 deps += [ "//ui/aura:test_support" ]
237 sources += gypi_values.views_unittests_desktop_aura_sources
239 sources += gypi_values.views_unittests_desktop_aurax11_sources
245 "//ui/events/platform/x11",
251 # views_unittests not yet compiling on Mac. http://crbug.com/378134
253 "bubble/bubble_window_targeter_unittest.cc",
254 "controls/button/custom_button_unittest.cc",
255 "controls/button/menu_button_unittest.cc",
256 "controls/menu/menu_controller_unittest.cc",
257 "controls/native/native_view_host_unittest.cc",
258 "focus/focus_manager_unittest.cc",
259 "ime/input_method_bridge_unittest.cc",
260 "widget/widget_unittest.cc",
261 "widget/window_reorderer_unittest.cc",
268 test("macviews_interactive_ui_tests") {
270 "cocoa/bridged_native_widget_interactive_uitest.mm",
271 "run_all_unittests.cc",
272 "widget/native_widget_mac_interactive_uitest.mm",
278 "//base/test:test_support",
284 "//ui/resources:ui_test_pak",