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" ]
22 "//base/third_party/dynamic_annotations",
27 "//ui/accessibility:ax_gen",
32 "//ui/events:events_base",
33 "//ui/events/platform",
43 forward_dependent_configs_from = [ "//ui/accessibility:ax_gen" ]
47 "bubble/tray_bubble_view.cc",
48 "bubble/tray_bubble_view.h",
51 if (use_x11 && !is_chromeos) {
52 deps += [ "//ui/display/util" ]
54 if (is_linux && !is_chromeos) {
55 sources -= [ "window/window_button_order_provider.cc" ]
56 deps += [ "//ui/shell_dialogs" ]
59 "linux_ui/linux_ui.h",
60 "linux_ui/linux_ui.cc",
61 "linux_ui/status_icon_linux.h",
62 "linux_ui/status_icon_linux.cc",
63 "linux_ui/window_button_order_observer.h",
64 "linux_ui/window_button_order_provider.cc",
69 sources += gypi_values.views_win_sources
70 cflags = [ "/wd4267" ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
71 libs = [ "/imm32.lib", "oleacc.lib" ]
72 ldflags = [ "/DELAYLOAD:user32.dll" ]
74 "//third_party/iaccessible2",
80 deps += [ "//ui/ozone" ]
84 "//build/config/linux:x11",
85 "//build/config/linux:xrandr",
88 "//ui/events/platform/x11",
93 sources += gypi_values.views_aura_sources
96 sources += gypi_values.views_desktop_aura_x11_sources
98 sources += gypi_values.views_desktop_aura_win_sources
99 } else if (use_ozone) {
100 sources += gypi_values.views_desktop_aura_ozone_sources
106 static_library("test_support") {
107 sources = gypi_values.views_test_support_sources
119 "//ui/events/platform",
127 "test/ui_controls_factory_desktop_aurax11.cc",
128 "test/ui_controls_factory_desktop_aurax11.h",
132 sources += gypi_values.views_test_support_aura_sources
133 deps += [ "//ui/aura:test_support" ]
137 if (false) { # TODO(GYP) enable once this links
139 test("views_unittests") {
140 sources = gypi_values.views_unittests_sources
148 "//base/test:test_support",
152 "//ui/accessibility",
155 "//ui/base:test_support",
157 "//ui/compositor:test_support",
159 "//ui/events:events_base",
160 "//ui/events/platform",
169 "ime/input_method_bridge_unittest.cc",
170 "widget/desktop_aura",
176 "//third_party/iaccessible2",
186 # 'VCManifestTool': {
187 # 'AdditionalManifestFiles': [
188 # '$(ProjectDir)\\test\\views_unittest.manifest',
196 "//build/config/linux:x11",
197 "//build/config/linux:xext",
200 "//ui/events/platform/x11",
206 "corewm/capture_controller_unittest.cc",
210 sources += gypi_values.views_unittests_aura_sources
211 deps = [ "//ui/aura:test_support" ]
213 sources += gypi_values.views_unittests_desktop_aura_sources
217 deps += [ "//ui/events/platform/x11" ]
221 # views_unittests not yet compiling on Mac. http://crbug.com/378134
223 "bubble/bubble_window_targeter_unittest.cc",
224 "controls/button/custom_button_unittest.cc",
225 "controls/button/menu_button_unittest.cc",
226 "controls/native/native_view_host_unittest.cc",
227 "controls/menu/menu_controller_unittest.cc",
228 "ime/input_method_bridge_unittest.cc",
229 "focus/focus_manager_unittest.cc",
230 "widget/window_reorderer_unittest.cc",
231 "widget/widget_unittest.cc",
237 test("macviews_interactive_ui_tests") {
239 "run_all_unittests.cc",
240 "widget/native_widget_mac_interactive_uitest.mm",
246 "//base/test:test_support",
252 "//ui/resources:ui_test_pak",