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")
8 gypi_values = exec_script(
9 "//build/gypi_to_gn.py",
10 [ rebase_path("views.gyp") ],
15 sources = gypi_values.views_sources
17 defines = [ "VIEWS_IMPLEMENTATION" ]
21 "//base/third_party/dynamic_annotations",
35 "//ui/accessibility:ax_gen",
39 "//ui/events:events_base",
40 "//ui/events/platform",
45 if (use_x11 && !is_chromeos) {
46 deps += [ "//ui/display/util" ]
48 if (is_linux && !is_chromeos) {
49 sources -= [ "window/window_button_order_provider.cc" ]
50 deps += [ "//ui/shell_dialogs" ]
53 "linux_ui/linux_ui.h",
54 "linux_ui/linux_ui.cc",
55 "linux_ui/window_button_order_observer.h",
56 "linux_ui/window_button_order_provider.cc",
62 "linux_ui/status_icon_linux.h",
63 "linux_ui/status_icon_linux.cc",
68 sources += gypi_values.views_win_sources
69 cflags = [ "/wd4267" ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
70 libs = [ "/imm32.lib", "oleacc.lib" ]
71 ldflags = [ "/DELAYLOAD:user32.dll" ]
73 "//third_party/iaccessible2",
79 deps += [ "//ui/ozone" ]
83 "//build/config/linux:x11",
84 "//build/config/linux:xrandr",
87 "//ui/events/platform/x11",
93 sources += gypi_values.views_aura_sources
95 sources += gypi_values.views_desktop_aura_sources
97 sources += gypi_values.views_desktop_aura_x11_sources
99 sources += gypi_values.views_desktop_aura_win_sources
100 } else if (use_ozone) {
101 sources += gypi_values.views_desktop_aura_ozone_sources
107 static_library("test_support") {
109 sources = gypi_values.views_test_support_sources
116 "//ipc:test_support",
122 "//ui/compositor:test_support",
124 "//ui/events:events_base",
125 "//ui/events:test_support",
126 "//ui/events/platform",
134 "test/ui_controls_factory_desktop_aurax11.cc",
135 "test/ui_controls_factory_desktop_aurax11.h",
139 sources += gypi_values.views_test_support_aura_sources
140 deps += [ "//ui/aura:test_support" ]
143 deps += [ "//ui/gfx/x" ]
147 test("views_unittests") {
148 sources = gypi_values.views_unittests_sources
155 "//base/test:test_support",
159 "//ui/accessibility",
162 "//ui/base:test_support",
163 "//ui/compositor:test_support",
164 "//ui/events:test_support",
165 "//ui/events:events_base",
166 "//ui/events/platform",
178 "ime/input_method_bridge_unittest.cc",
184 "//third_party/iaccessible2",
194 # 'VCManifestTool': {
195 # 'AdditionalManifestFiles': [
196 # '$(ProjectDir)\\test\\views_unittest.manifest',
204 "//build/config/linux:x11",
205 "//build/config/linux:xext",
208 "//ui/events/platform/x11",
214 sources += gypi_values.views_unittests_aura_sources
215 deps += [ "//ui/aura:test_support" ]
217 sources += gypi_values.views_unittests_desktop_aura_sources
222 "//ui/events/platform/x11",
228 # views_unittests not yet compiling on Mac. http://crbug.com/378134
230 "bubble/bubble_window_targeter_unittest.cc",
231 "controls/button/custom_button_unittest.cc",
232 "controls/button/menu_button_unittest.cc",
233 "controls/native/native_view_host_unittest.cc",
234 "controls/menu/menu_controller_unittest.cc",
235 "ime/input_method_bridge_unittest.cc",
236 "focus/focus_manager_unittest.cc",
237 "widget/window_reorderer_unittest.cc",
238 "widget/widget_unittest.cc",
244 test("macviews_interactive_ui_tests") {
246 "run_all_unittests.cc",
247 "widget/native_widget_mac_interactive_uitest.mm",
253 "//base/test:test_support",
259 "//ui/resources:ui_test_pak",