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/user_manager",
29 "//components/wallpaper",
30 "//content/public/browser",
42 "//ui/events:events_base",
43 "//ui/events/devices",
47 "//ui/message_center",
51 "//ui/views/controls/webview",
59 "sticky_keys/sticky_keys_controller.cc",
60 "sticky_keys/sticky_keys_controller.h",
63 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
64 cflags = [ "/wd4267" ]
69 "//build/config/linux:x11",
70 "//build/config/linux:xfixes",
73 "//ui/events:gesture_detection",
74 "//ui/events/platform",
79 "host/ash_window_tree_host_x11.cc",
80 "host/ash_window_tree_host_x11.h",
81 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
82 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
87 deps += [ "//ui/ozone" ]
96 "//chromeos:power_manager_proto",
97 "//ui/chromeos/resources",
98 "//ui/chromeos/strings",
99 "//ui/chromeos:ui_chromeos",
103 "accelerators/key_hold_detector.cc",
104 "accelerators/key_hold_detector.h",
105 "accelerators/magnifier_key_scroller.cc",
106 "accelerators/magnifier_key_scroller.h",
107 "accelerators/spoken_feedback_toggler.cc",
108 "accelerators/spoken_feedback_toggler.h",
109 "display/display_configurator_animation.cc",
110 "display/display_configurator_animation.h",
111 "display/resolution_notification_controller.cc",
112 "display/resolution_notification_controller.h",
113 "system/tray/media_security/media_capture_observer.h",
114 "system/tray/media_security/multi_profile_media_tray_item.cc",
115 "system/tray/media_security/multi_profile_media_tray_item.h",
116 "touch/touch_transformer_controller.cc",
117 "touch/touch_transformer_controller.h",
118 "touch/touchscreen_util.cc",
119 "touch/touchscreen_util.h",
120 "virtual_keyboard_controller.cc",
121 "virtual_keyboard_controller.h",
127 "host/ash_window_tree_host_ozone.cc",
128 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc",
129 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h",
134 component("ash_with_content") {
136 "content_support/ash_with_content_export.h",
137 "content_support/gpu_support_impl.cc",
138 "content_support/gpu_support_impl.h",
139 "keyboard_overlay/keyboard_overlay_delegate.cc",
140 "keyboard_overlay/keyboard_overlay_delegate.h",
141 "keyboard_overlay/keyboard_overlay_view.cc",
142 "keyboard_overlay/keyboard_overlay_view.h",
145 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
152 "//base/third_party/dynamic_annotations",
153 "//content/public/browser",
165 "//ui/views/controls/webview",
171 static_library("test_support") {
173 sources = gypi_values.ash_test_support_sources
180 "//content/test:test_support",
183 "//ui/accessibility",
185 "//ui/app_list:test_support",
186 "//ui/events:events_base",
187 "//ui/events/devices",
190 "//ui/views:test_support",
195 "test/test_metro_viewer_process_host.cc",
196 "test/test_metro_viewer_process_host.h",
201 "//win8:metro_viewer",
202 "//win8:test_support_win8",
203 "//win8:test_registrar",
208 static_library("ash_shell_lib") {
210 sources = gypi_values.ash_shell_lib_sources
221 #"//chrome:packed_resources", TODO(GYP)
223 "//content/shell:content_shell_lib",
232 "//ui/events:events_base",
236 "//ui/message_center",
239 "//ui/views:test_support",
240 "//ui/views/examples:views_examples_lib",
241 "//ui/views/examples:views_examples_with_content_lib",
245 test("ash_unittests") {
246 sources = gypi_values.ash_unittests_sources
256 "//base/test:test_support",
257 "//components/user_manager",
258 "//content/public/browser",
259 "//content/test:test_support",
263 "//ui/accelerometer",
264 "//ui/accessibility",
266 "//ui/aura:test_support",
268 "//ui/base:test_support",
270 "//ui/compositor:test_support",
272 "//ui/events/devices",
273 "//ui/events:test_support",
274 "//ui/events:gesture_detection",
278 "//ui/message_center",
279 "//ui/message_center:test_support",
282 "//ui/views:test_support",
283 "//ui/views/controls/webview:test_support",
284 "//ui/web_dialogs:test_support",
291 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
292 "focus_cycler_unittest.cc",
294 # All tests for multiple displays: not supported on Windows Ash.
295 "wm/drag_window_resizer_unittest.cc",
297 # Accelerometer is only available on Chrome OS.
298 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
300 # Can't resize on Windows Ash. http://crbug.com/165962
301 "magnifier/magnification_controller_unittest.cc",
302 "wm/workspace/workspace_window_resizer_unittest.cc",
303 "sticky_keys/sticky_keys_overlay_unittest.cc",
304 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
305 "autoclick/autoclick_unittest.cc",
306 "virtual_keyboard_controller_unittest.cc",
309 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
314 cflags = [ "/wd4267" ]
318 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
321 sources += [ "first_run/first_run_helper_unittest.cc" ]
323 "//device/bluetooth",
325 "//ui/display:test_util",
326 "//ui/display/types",
327 "//chromeos:power_manager_proto",
328 "//chromeos:test_support_without_gmock",
332 "accelerators/magnifier_key_scroller_unittest.cc",
333 "accelerators/spoken_feedback_toggler_unittest.cc",
334 "display/resolution_notification_controller_unittest.cc",
335 "touch/touchscreen_util_unittest.cc",
339 if (!use_x11 || !is_chromeos) {
340 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
343 # TODO(GYP) is this necessary?
344 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
345 # ldflags = "-rdynamic"
347 if (!is_chromeos || use_ozone) {
348 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
352 executable("ash_shell") {
355 "shell/shell_main.cc",
360 "//components/user_manager",
364 configs -= [ "//build/config/win:console" ]
365 configs += [ "//build/config/win:windowed" ]
366 deps += [ "//sandbox" ]
370 deps += [ "//device/bluetooth" ]
374 test("ash_shell_unittests") {
376 "shell/window_watcher_unittest.cc",
377 "test/ash_unittests.cc",
383 "//base/test:test_support",
384 "//components/user_manager",
385 "//content/test:test_support",
388 "//ui/accessibility",
392 deps += [ "//ui/display" ]