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",
78 deps += [ "//ui/ozone" ]
87 "//chromeos:power_manager_proto",
88 "//ui/chromeos/resources",
89 "//ui/chromeos/strings",
90 "//ui/chromeos:ui_chromeos",
94 "accelerators/key_hold_detector.cc",
95 "accelerators/key_hold_detector.h",
96 "accelerators/magnifier_key_scroller.cc",
97 "accelerators/magnifier_key_scroller.h",
98 "accelerators/spoken_feedback_toggler.cc",
99 "accelerators/spoken_feedback_toggler.h",
100 "display/display_configurator_animation.cc",
101 "display/display_configurator_animation.h",
102 "display/resolution_notification_controller.cc",
103 "display/resolution_notification_controller.h",
104 "system/tray/media_security/media_capture_observer.h",
105 "system/tray/media_security/multi_profile_media_tray_item.cc",
106 "system/tray/media_security/multi_profile_media_tray_item.h",
107 "touch/touch_transformer_controller.cc",
108 "touch/touch_transformer_controller.h",
109 "touch/touchscreen_util.cc",
110 "touch/touchscreen_util.h",
111 "virtual_keyboard_controller.cc",
112 "virtual_keyboard_controller.h",
117 sources -= [ "host/ash_window_tree_host_ozone.cc" ]
121 component("ash_with_content") {
123 "content_support/ash_with_content_export.h",
124 "content_support/gpu_support_impl.cc",
125 "content_support/gpu_support_impl.h",
126 "keyboard_overlay/keyboard_overlay_delegate.cc",
127 "keyboard_overlay/keyboard_overlay_delegate.h",
128 "keyboard_overlay/keyboard_overlay_view.cc",
129 "keyboard_overlay/keyboard_overlay_view.h",
132 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
139 "//base/third_party/dynamic_annotations",
140 "//content/public/browser",
152 "//ui/views/controls/webview",
158 static_library("test_support") {
160 sources = gypi_values.ash_test_support_sources
167 "//content/test:test_support",
170 "//ui/accessibility",
172 "//ui/app_list:test_support",
173 "//ui/events:events_base",
174 "//ui/events/devices",
177 "//ui/views:test_support",
182 "test/test_metro_viewer_process_host.cc",
183 "test/test_metro_viewer_process_host.h",
187 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
188 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
189 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
190 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
195 static_library("ash_shell_lib") {
197 sources = gypi_values.ash_shell_lib_sources
208 #"//chrome:packed_resources", TODO(GYP)
210 "//content/shell:content_shell_lib",
219 "//ui/events:events_base",
223 "//ui/message_center",
226 "//ui/views:test_support",
227 "//ui/views/examples:views_examples_lib",
228 "//ui/views/examples:views_examples_with_content_lib",
232 test("ash_unittests") {
233 sources = gypi_values.ash_unittests_sources
243 "//base/test:test_support",
244 "//components/user_manager",
245 "//content/public/browser",
246 "//content/test:test_support",
250 "//ui/accelerometer",
251 "//ui/accessibility",
253 "//ui/aura:test_support",
255 "//ui/base:test_support",
257 "//ui/compositor:test_support",
259 "//ui/events/devices",
260 "//ui/events:test_support",
261 "//ui/events:gesture_detection",
265 "//ui/message_center",
266 "//ui/message_center:test_support",
269 "//ui/views:test_support",
270 "//ui/views/controls/webview:test_support",
271 "//ui/web_dialogs:test_support",
278 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
279 "focus_cycler_unittest.cc",
281 # All tests for multiple displays: not supported on Windows Ash.
282 "wm/drag_window_resizer_unittest.cc",
284 # Accelerometer is only available on Chrome OS.
285 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
287 # Can't resize on Windows Ash. http://crbug.com/165962
288 "magnifier/magnification_controller_unittest.cc",
289 "wm/workspace/workspace_window_resizer_unittest.cc",
290 "sticky_keys/sticky_keys_overlay_unittest.cc",
291 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
292 "autoclick/autoclick_unittest.cc",
293 "virtual_keyboard_controller_unittest.cc",
296 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
301 cflags = [ "/wd4267" ]
305 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
308 sources += [ "first_run/first_run_helper_unittest.cc" ]
310 "//device/bluetooth",
312 "//ui/display:test_util",
313 "//ui/display/types",
314 "//chromeos:power_manager_proto",
315 "//chromeos:test_support_without_gmock",
319 "accelerators/magnifier_key_scroller_unittest.cc",
320 "accelerators/spoken_feedback_toggler_unittest.cc",
321 "display/resolution_notification_controller_unittest.cc",
322 "touch/touchscreen_util_unittest.cc",
326 if (!use_x11 || !is_chromeos) {
327 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
330 # TODO(GYP) is this necessary?
331 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
332 # ldflags = "-rdynamic"
334 if (!is_chromeos || use_ozone) {
335 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
339 executable("ash_shell") {
342 "shell/shell_main.cc",
347 "//components/user_manager",
351 configs -= [ "//build/config/win:console" ]
352 configs += [ "//build/config/win:windowed" ]
353 deps += [ "//sandbox" ]
357 deps += [ "//device/bluetooth" ]
361 test("ash_shell_unittests") {
363 "shell/window_watcher_unittest.cc",
364 "test/ash_unittests.cc",
370 "//base/test:test_support",
371 "//components/user_manager",
372 "//content/test:test_support",
375 "//ui/accessibility",
379 deps += [ "//ui/display" ]