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 configs += [ "//build/config:precompiled_headers" ]
18 defines = [ "ASH_IMPLEMENTATION" ]
27 "//base/third_party/dynamic_annotations",
29 "//components/device_event_log",
30 "//components/user_manager",
31 "//components/wallpaper",
32 "//content/public/browser",
44 "//ui/events:events_base",
45 "//ui/events:gesture_detection",
46 "//ui/events/devices",
50 "//ui/message_center",
54 "//ui/views/controls/webview",
62 "sticky_keys/sticky_keys_controller.cc",
63 "sticky_keys/sticky_keys_controller.h",
66 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
67 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
72 "//build/config/linux:x11",
73 "//build/config/linux:xfixes",
76 "//ui/events/platform",
81 "host/ash_window_tree_host_x11.cc",
82 "host/ash_window_tree_host_x11.h",
83 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
84 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
90 "//ui/events/ozone:events_ozone",
101 "//chromeos:power_manager_proto",
102 "//third_party/qcms",
103 "//ui/chromeos/resources",
104 "//ui/chromeos/strings",
105 "//ui/chromeos:ui_chromeos",
109 "accelerators/key_hold_detector.cc",
110 "accelerators/key_hold_detector.h",
111 "accelerators/magnifier_key_scroller.cc",
112 "accelerators/magnifier_key_scroller.h",
113 "accelerators/spoken_feedback_toggler.cc",
114 "accelerators/spoken_feedback_toggler.h",
115 "display/display_configurator_animation.cc",
116 "display/display_configurator_animation.h",
117 "display/resolution_notification_controller.cc",
118 "display/resolution_notification_controller.h",
119 "system/tray/media_security/media_capture_observer.h",
120 "system/tray/media_security/multi_profile_media_tray_item.cc",
121 "system/tray/media_security/multi_profile_media_tray_item.h",
122 "touch/touch_transformer_controller.cc",
123 "touch/touch_transformer_controller.h",
124 "touch/touchscreen_util.cc",
125 "touch/touchscreen_util.h",
126 "virtual_keyboard_controller.cc",
127 "virtual_keyboard_controller.h",
133 "host/ash_window_tree_host_ozone.cc",
134 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc",
135 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h",
140 component("ash_with_content") {
142 "content_support/ash_with_content_export.h",
143 "content_support/gpu_support_impl.cc",
144 "content_support/gpu_support_impl.h",
145 "keyboard_overlay/keyboard_overlay_delegate.cc",
146 "keyboard_overlay/keyboard_overlay_delegate.h",
147 "keyboard_overlay/keyboard_overlay_view.cc",
148 "keyboard_overlay/keyboard_overlay_view.h",
151 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
158 "//base/third_party/dynamic_annotations",
159 "//content/public/browser",
171 "//ui/views/controls/webview",
177 source_set("test_support") {
179 sources = gypi_values.ash_test_support_sources
180 configs += [ "//build/config:precompiled_headers" ]
187 "//content/test:test_support",
190 "//ui/accessibility",
192 "//ui/app_list:test_support",
193 "//ui/events:events_base",
194 "//ui/events/devices",
197 "//ui/views:test_support",
202 "test/test_metro_viewer_process_host.cc",
203 "test/test_metro_viewer_process_host.h",
208 "//ui/platform_window/win",
209 "//win8:metro_viewer",
210 "//win8:test_support_win8",
211 "//win8:test_registrar",
216 static_library("ash_shell_lib") {
218 sources = gypi_values.ash_shell_lib_sources
229 #"//chrome:packed_resources", TODO(GYP)
231 "//content/shell:content_shell_lib",
241 "//ui/events:events_base",
245 "//ui/message_center",
248 "//ui/views:test_support",
249 "//ui/views/examples:views_examples_lib",
250 "//ui/views/examples:views_examples_with_content_lib",
254 test("ash_unittests") {
255 sources = gypi_values.ash_unittests_sources
256 configs += [ "//build/config:precompiled_headers" ]
266 "//base/test:test_support",
267 "//components/user_manager",
268 "//content/public/browser",
269 "//content/test:test_support",
273 "//ui/accessibility",
275 "//ui/aura:test_support",
278 "//ui/base:test_support",
280 "//ui/compositor:test_support",
282 "//ui/events/devices",
283 "//ui/events:test_support",
284 "//ui/events:gesture_detection",
288 "//ui/message_center",
289 "//ui/message_center:test_support",
292 "//ui/views:test_support",
293 "//ui/views/controls/webview:test_support",
294 "//ui/web_dialogs:test_support",
301 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
302 "focus_cycler_unittest.cc",
304 # All tests for multiple displays: not supported on Windows Ash.
305 "wm/drag_window_resizer_unittest.cc",
307 # Accelerometer is only available on Chrome OS.
308 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
310 # Can't resize on Windows Ash. http://crbug.com/165962
311 "autoclick/autoclick_unittest.cc",
312 "magnifier/magnification_controller_unittest.cc",
313 "sticky_keys/sticky_keys_overlay_unittest.cc",
314 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
315 "virtual_keyboard_controller_unittest.cc",
316 "wm/workspace/workspace_window_resizer_unittest.cc",
319 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
323 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
326 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
329 sources += [ "first_run/first_run_helper_unittest.cc" ]
331 "//device/bluetooth",
333 "//ui/display:test_util",
334 "//ui/display/types",
335 "//chromeos:power_manager_proto",
336 "//chromeos:test_support_without_gmock",
340 "accelerators/magnifier_key_scroller_unittest.cc",
341 "accelerators/spoken_feedback_toggler_unittest.cc",
342 "display/resolution_notification_controller_unittest.cc",
343 "touch/touchscreen_util_unittest.cc",
347 if (!use_x11 || !is_chromeos) {
348 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
351 # TODO(GYP) is this necessary?
352 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
353 # ldflags = "-rdynamic"
355 if (!is_chromeos || use_ozone) {
356 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
360 executable("ash_shell") {
363 "shell/shell_main.cc",
368 "//components/user_manager",
372 configs -= [ "//build/config/win:console" ]
373 configs += [ "//build/config/win:windowed" ]
374 deps += [ "//sandbox" ]
378 deps += [ "//device/bluetooth" ]
382 test("ash_shell_unittests") {
384 "shell/window_watcher_unittest.cc",
385 "test/ash_unittests.cc",
391 "//base/test:test_support",
392 "//components/user_manager",
393 "//content/test:test_support",
396 "//ui/accessibility",
400 deps += [ "//ui/display" ]
403 # When adding support for isolates, please have a look at run-time dependencies
404 # in the ash_unittests_run target in ash.gyp.