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("ash.gyp") ],
15 sources = gypi_values.ash_sources
17 defines = [ "ASH_IMPLEMENTATION" ]
26 "//base/third_party/dynamic_annotations",
28 "//components/device_event_log",
29 "//components/user_manager",
30 "//components/wallpaper",
31 "//content/public/browser",
43 "//ui/events:events_base",
44 "//ui/events:gesture_detection",
45 "//ui/events/devices",
49 "//ui/message_center",
53 "//ui/views/controls/webview",
61 "sticky_keys/sticky_keys_controller.cc",
62 "sticky_keys/sticky_keys_controller.h",
65 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
66 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
71 "//build/config/linux:x11",
72 "//build/config/linux:xfixes",
75 "//ui/events/platform",
80 "host/ash_window_tree_host_x11.cc",
81 "host/ash_window_tree_host_x11.h",
82 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
83 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
89 "//ui/events/ozone:events_ozone",
100 "//chromeos:power_manager_proto",
101 "//ui/chromeos/resources",
102 "//ui/chromeos/strings",
103 "//ui/chromeos:ui_chromeos",
107 "accelerators/key_hold_detector.cc",
108 "accelerators/key_hold_detector.h",
109 "accelerators/magnifier_key_scroller.cc",
110 "accelerators/magnifier_key_scroller.h",
111 "accelerators/spoken_feedback_toggler.cc",
112 "accelerators/spoken_feedback_toggler.h",
113 "display/display_configurator_animation.cc",
114 "display/display_configurator_animation.h",
115 "display/resolution_notification_controller.cc",
116 "display/resolution_notification_controller.h",
117 "system/tray/media_security/media_capture_observer.h",
118 "system/tray/media_security/multi_profile_media_tray_item.cc",
119 "system/tray/media_security/multi_profile_media_tray_item.h",
120 "touch/touch_transformer_controller.cc",
121 "touch/touch_transformer_controller.h",
122 "touch/touchscreen_util.cc",
123 "touch/touchscreen_util.h",
124 "virtual_keyboard_controller.cc",
125 "virtual_keyboard_controller.h",
131 "host/ash_window_tree_host_ozone.cc",
132 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc",
133 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h",
138 component("ash_with_content") {
140 "content_support/ash_with_content_export.h",
141 "content_support/gpu_support_impl.cc",
142 "content_support/gpu_support_impl.h",
143 "keyboard_overlay/keyboard_overlay_delegate.cc",
144 "keyboard_overlay/keyboard_overlay_delegate.h",
145 "keyboard_overlay/keyboard_overlay_view.cc",
146 "keyboard_overlay/keyboard_overlay_view.h",
149 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
156 "//base/third_party/dynamic_annotations",
157 "//content/public/browser",
169 "//ui/views/controls/webview",
175 static_library("test_support") {
177 sources = gypi_values.ash_test_support_sources
184 "//content/test:test_support",
187 "//ui/accessibility",
189 "//ui/app_list:test_support",
190 "//ui/events:events_base",
191 "//ui/events/devices",
194 "//ui/views:test_support",
199 "test/test_metro_viewer_process_host.cc",
200 "test/test_metro_viewer_process_host.h",
205 "//ui/platform_window/win",
206 "//win8:metro_viewer",
207 "//win8:test_support_win8",
208 "//win8:test_registrar",
213 static_library("ash_shell_lib") {
215 sources = gypi_values.ash_shell_lib_sources
226 #"//chrome:packed_resources", TODO(GYP)
228 "//content/shell:content_shell_lib",
238 "//ui/events:events_base",
242 "//ui/message_center",
245 "//ui/views:test_support",
246 "//ui/views/examples:views_examples_lib",
247 "//ui/views/examples:views_examples_with_content_lib",
251 test("ash_unittests") {
252 sources = gypi_values.ash_unittests_sources
262 "//base/test:test_support",
263 "//components/user_manager",
264 "//content/public/browser",
265 "//content/test:test_support",
269 "//ui/accessibility",
271 "//ui/aura:test_support",
274 "//ui/base:test_support",
276 "//ui/compositor:test_support",
278 "//ui/events/devices",
279 "//ui/events:test_support",
280 "//ui/events:gesture_detection",
284 "//ui/message_center",
285 "//ui/message_center:test_support",
288 "//ui/views:test_support",
289 "//ui/views/controls/webview:test_support",
290 "//ui/web_dialogs:test_support",
297 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
298 "focus_cycler_unittest.cc",
300 # All tests for multiple displays: not supported on Windows Ash.
301 "wm/drag_window_resizer_unittest.cc",
303 # Accelerometer is only available on Chrome OS.
304 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
306 # Can't resize on Windows Ash. http://crbug.com/165962
307 "autoclick/autoclick_unittest.cc",
308 "magnifier/magnification_controller_unittest.cc",
309 "sticky_keys/sticky_keys_overlay_unittest.cc",
310 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
311 "virtual_keyboard_controller_unittest.cc",
312 "wm/workspace/workspace_window_resizer_unittest.cc",
315 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
319 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
322 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
325 sources += [ "first_run/first_run_helper_unittest.cc" ]
327 "//device/bluetooth",
329 "//ui/display:test_util",
330 "//ui/display/types",
331 "//chromeos:power_manager_proto",
332 "//chromeos:test_support_without_gmock",
336 "accelerators/magnifier_key_scroller_unittest.cc",
337 "accelerators/spoken_feedback_toggler_unittest.cc",
338 "display/resolution_notification_controller_unittest.cc",
339 "touch/touchscreen_util_unittest.cc",
343 if (!use_x11 || !is_chromeos) {
344 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
347 # TODO(GYP) is this necessary?
348 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
349 # ldflags = "-rdynamic"
351 if (!is_chromeos || use_ozone) {
352 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
356 executable("ash_shell") {
359 "shell/shell_main.cc",
364 "//components/user_manager",
368 configs -= [ "//build/config/win:console" ]
369 configs += [ "//build/config/win:windowed" ]
370 deps += [ "//sandbox" ]
374 deps += [ "//device/bluetooth" ]
378 test("ash_shell_unittests") {
380 "shell/window_watcher_unittest.cc",
381 "test/ash_unittests.cc",
387 "//base/test:test_support",
388 "//components/user_manager",
389 "//content/test:test_support",
392 "//ui/accessibility",
396 deps += [ "//ui/display" ]
399 # When adding support for isolates, please have a look at run-time dependencies
400 # in the ash_unittests_run target in ash.gyp.