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("//build/gypi_to_gn.py",
9 [ rebase_path("ash.gyp") ],
14 sources = gypi_values.ash_sources
16 defines = [ "ASH_IMPLEMENTATION" ]
25 "//base/third_party/dynamic_annotations",
27 "//components/user_manager",
28 "//components/wallpaper",
29 "//content/public/browser",
41 "//ui/events:events_base",
42 "//ui/events/devices",
46 "//ui/message_center",
50 "//ui/views/controls/webview",
58 "sticky_keys/sticky_keys_controller.cc",
59 "sticky_keys/sticky_keys_controller.h",
62 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
63 cflags = [ "/wd4267" ]
67 configs += [ "//build/config/linux:xfixes" ]
70 "host/ash_window_tree_host_x11.cc",
71 "host/ash_window_tree_host_x11.h",
72 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
73 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
83 "//chromeos:power_manager_proto",
84 "//ui/chromeos/resources",
85 "//ui/chromeos/strings",
86 "//ui/chromeos:ui_chromeos",
90 "accelerators/key_hold_detector.cc",
91 "accelerators/key_hold_detector.h",
92 "accelerators/magnifier_key_scroller.cc",
93 "accelerators/magnifier_key_scroller.h",
94 "accelerators/spoken_feedback_toggler.cc",
95 "accelerators/spoken_feedback_toggler.h",
96 "display/display_configurator_animation.cc",
97 "display/display_configurator_animation.h",
98 "display/resolution_notification_controller.cc",
99 "display/resolution_notification_controller.h",
100 "system/tray/media_security/media_capture_observer.h",
101 "system/tray/media_security/multi_profile_media_tray_item.cc",
102 "system/tray/media_security/multi_profile_media_tray_item.h",
103 "touch/touch_transformer_controller.cc",
104 "touch/touch_transformer_controller.h",
105 "touch/touchscreen_util.cc",
106 "touch/touchscreen_util.h",
107 "virtual_keyboard_controller.cc",
108 "virtual_keyboard_controller.h",
113 sources -= [ "host/ash_window_tree_host_ozone.cc" ]
117 component("ash_with_content") {
119 "content_support/ash_with_content_export.h",
120 "content_support/gpu_support_impl.cc",
121 "content_support/gpu_support_impl.h",
122 "screensaver/screensaver_view.cc",
123 "screensaver/screensaver_view.h",
124 "keyboard_overlay/keyboard_overlay_delegate.cc",
125 "keyboard_overlay/keyboard_overlay_delegate.h",
126 "keyboard_overlay/keyboard_overlay_view.cc",
127 "keyboard_overlay/keyboard_overlay_view.h",
130 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
137 "//base/third_party/dynamic_annotations",
138 "//content/public/browser",
150 "//ui/views/controls/webview",
156 static_library("test_support") {
158 sources = gypi_values.ash_test_support_sources
165 "//content/test:test_support",
168 "//ui/accessibility",
170 "//ui/app_list:test_support",
171 "//ui/events:events_base",
172 "//ui/events/devices",
175 "//ui/views:test_support",
180 "test/test_metro_viewer_process_host.cc",
181 "test/test_metro_viewer_process_host.h",
185 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
186 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
187 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
188 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
193 static_library("ash_shell_lib") {
195 sources = gypi_values.ash_shell_lib_sources
206 #"//chrome:packed_resources", TODO(GYP)
208 "//content/shell:content_shell_lib",
217 "//ui/events:events_base",
221 "//ui/message_center",
224 "//ui/views:test_support",
225 "//ui/views/examples:views_examples_lib",
226 "//ui/views/examples:views_examples_with_content_lib",
230 test("ash_unittests") {
231 sources = gypi_values.ash_unittests_sources
241 "//base/test:test_support",
242 "//components/user_manager",
243 "//content/public/browser",
244 "//content/test:test_support",
248 "//ui/accelerometer",
249 "//ui/accessibility",
251 "//ui/aura:test_support",
253 "//ui/base:test_support",
255 "//ui/compositor:test_support",
257 "//ui/events/devices",
258 "//ui/events:test_support",
259 "//ui/events:gesture_detection",
263 "//ui/message_center",
264 "//ui/message_center:test_support",
267 "//ui/views:test_support",
268 "//ui/views/controls/webview:test_support",
269 "//ui/web_dialogs:test_support",
276 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
277 "focus_cycler_unittest.cc",
279 # All tests for multiple displays: not supported on Windows Ash.
280 "wm/drag_window_resizer_unittest.cc",
282 # Can't resize on Windows Ash. http://crbug.com/165962
283 "magnifier/magnification_controller_unittest.cc",
284 "wm/workspace/workspace_window_resizer_unittest.cc",
285 "sticky_keys/sticky_keys_overlay_unittest.cc",
286 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
287 "autoclick/autoclick_unittest.cc",
288 "virtual_keyboard_controller_unittest.cc",
291 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
296 cflags = [ "/wd4267" ]
300 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
303 sources += [ "first_run/first_run_helper_unittest.cc" ]
305 "//device/bluetooth",
307 "//ui/display:test_util",
308 "//ui/display/types",
309 "//chromeos:power_manager_proto",
310 "//chromeos:test_support_without_gmock",
314 "accelerators/magnifier_key_scroller_unittest.cc",
315 "accelerators/spoken_feedback_toggler_unittest.cc",
316 "display/resolution_notification_controller_unittest.cc",
317 "touch/touchscreen_util_unittest.cc",
321 if (!use_x11 || !is_chromeos) {
322 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
325 # TODO(GYP) is this necessary?
326 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
327 # ldflags = "-rdynamic"
329 if (!is_chromeos || use_ozone) {
330 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
334 executable("ash_shell") {
337 "shell/shell_main.cc",
342 "//components/user_manager",
346 configs -= [ "//build/config/win:console" ]
347 configs += [ "//build/config/win:windowed" ]
348 deps += [ "//sandbox" ]
352 deps += [ "//device/bluetooth" ]
356 test("ash_shell_unittests") {
358 "shell/window_watcher_unittest.cc",
359 "test/ash_unittests.cc",
365 "//base/test:test_support",
366 "//components/user_manager",
367 "//content/test:test_support",
370 "//ui/accessibility",
374 deps += [ "//ui/display" ]