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(
9 "//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 "//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",
61 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
62 cflags = [ "/wd4267" ]
67 "//build/config/linux:xfixes",
71 "accelerators/key_hold_detector.cc",
72 "accelerators/key_hold_detector.h",
73 "accelerators/magnifier_key_scroller.cc",
74 "accelerators/magnifier_key_scroller.h",
75 "accelerators/spoken_feedback_toggler.cc",
76 "accelerators/spoken_feedback_toggler.h",
77 "host/ash_window_tree_host_x11.cc",
78 "host/ash_window_tree_host_x11.h",
79 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
80 "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
90 "//chromeos:power_manager_proto",
91 "//ui/chromeos/resources",
92 "//ui/chromeos/strings",
93 "//ui/chromeos:ui_chromeos",
97 "display/display_configurator_animation.cc",
98 "display/display_configurator_animation.h",
99 "display/resolution_notification_controller.cc",
100 "display/resolution_notification_controller.h",
101 "system/tray/media_security/media_capture_observer.h",
102 "system/tray/media_security/multi_profile_media_tray_item.cc",
103 "system/tray/media_security/multi_profile_media_tray_item.h",
104 "touch/touch_transformer_controller.cc",
105 "touch/touch_transformer_controller.h",
106 "touch/touchscreen_util.cc",
107 "touch/touchscreen_util.h",
108 "virtual_keyboard_controller.cc",
109 "virtual_keyboard_controller.h",
115 "host/ash_window_tree_host_ozone.cc",
120 component("ash_with_content") {
122 "content_support/ash_with_content_export.h",
123 "content_support/gpu_support_impl.cc",
124 "content_support/gpu_support_impl.h",
125 "screensaver/screensaver_view.cc",
126 "screensaver/screensaver_view.h",
127 "keyboard_overlay/keyboard_overlay_delegate.cc",
128 "keyboard_overlay/keyboard_overlay_delegate.h",
129 "keyboard_overlay/keyboard_overlay_view.cc",
130 "keyboard_overlay/keyboard_overlay_view.h",
133 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
140 "//base/third_party/dynamic_annotations",
141 "//content/public/browser",
153 "//ui/views/controls/webview",
159 static_library("test_support") {
161 sources = gypi_values.ash_test_support_sources
168 "//content/test:test_support",
171 "//ui/accessibility",
173 "//ui/app_list:test_support",
174 "//ui/events:events_base",
175 "//ui/events/devices",
178 "//ui/views:test_support",
183 "test/test_metro_viewer_process_host.cc",
184 "test/test_metro_viewer_process_host.h",
188 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
189 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
190 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
191 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
196 static_library("ash_shell_lib") {
198 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",
280 # All tests for multiple displays: not supported on Windows Ash.
281 "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" ]
301 "accelerators/magnifier_key_scroller_unittest.cc",
302 "accelerators/spoken_feedback_toggler_unittest.cc",
303 "host/ash_window_tree_host_x11_unittest.cc",
307 sources += [ "first_run/first_run_helper_unittest.cc" ]
309 "//device/bluetooth",
311 "//ui/display:test_util",
312 "//ui/display/types",
313 "//chromeos:power_manager_proto",
314 "//chromeos:test_support_without_gmock",
318 "display/resolution_notification_controller_unittest.cc",
319 "touch/touchscreen_util_unittest.cc",
323 if (!use_x11 || !is_chromeos) {
324 sources -= [ "touch/touch_transformer_controller_unittest.cc", ]
327 # TODO(GYP) is this necessary?
328 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
329 # ldflags = "-rdynamic"
331 if (!is_chromeos || use_ozone) {
333 "sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035
338 executable("ash_shell") {
341 "shell/shell_main.cc",
346 "//components/user_manager",
350 configs -= [ "//build/config/win:console" ]
351 configs += [ "//build/config/win:windowed" ]
359 "//device/bluetooth",
364 test("ash_shell_unittests") {
366 "shell/window_watcher_unittest.cc",
367 "test/ash_unittests.cc",
373 "//base/test:test_support",
374 "//components/user_manager",
375 "//content/test:test_support",
378 "//ui/accessibility",
382 deps += [ "//ui/display" ]