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",
45 "//ui/message_center",
49 "//ui/views/controls/webview",
57 "sticky_keys/sticky_keys_controller.cc",
58 "sticky_keys/sticky_keys_controller.h",
60 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
61 cflags = [ "/wd4267" ]
66 "//build/config/linux:xfixes",
70 "accelerators/key_hold_detector.cc",
71 "accelerators/key_hold_detector.h",
72 "accelerators/magnifier_key_scroller.cc",
73 "accelerators/magnifier_key_scroller.h",
74 "accelerators/spoken_feedback_toggler.cc",
75 "accelerators/spoken_feedback_toggler.h",
84 #'../chromeos/chromeos.gyp:chromeos', TODO(GYP)
85 # Ash #includes power_supply_properties.pb.h directly.
86 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
87 "//ui/chromeos/resources",
88 "//ui/chromeos/strings",
89 "//ui/chromeos:ui_chromeos",
93 "display/display_configurator_animation.cc",
94 "display/display_configurator_animation.h",
95 "display/resolution_notification_controller.cc",
96 "display/resolution_notification_controller.h",
97 "system/tray/media_security/media_capture_observer.h",
98 "system/tray/media_security/multi_profile_media_tray_item.cc",
99 "system/tray/media_security/multi_profile_media_tray_item.h",
103 if (!use_x11 || !is_chromeos) {
105 "touch/touch_transformer_controller.cc",
106 "touch/touch_transformer_controller.h",
107 "touch/touchscreen_util.cc",
108 "touch/touchscreen_util.h",
114 "host/ash_window_tree_host_ozone.cc",
119 component("ash_with_content") {
121 "content_support/ash_with_content_export.h",
122 "content_support/gpu_support_impl.cc",
123 "content_support/gpu_support_impl.h",
124 "screensaver/screensaver_view.cc",
125 "screensaver/screensaver_view.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",
176 "//ui/views:test_support",
181 "test/test_metro_viewer_process_host.cc",
182 "test/test_metro_viewer_process_host.h",
186 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
187 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
188 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
189 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
194 static_library("ash_shell_lib") {
196 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:test_support",
258 "//ui/events:gesture_detection",
262 "//ui/message_center",
263 "//ui/message_center:test_support",
266 "//ui/views:test_support",
267 "//ui/views/controls/webview:test_support",
268 "//ui/web_dialogs:test_support",
275 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
276 "focus_cycler_unittest.cc",
277 # All tests for multiple displays: not supported on Windows Ash.
278 "wm/drag_window_resizer_unittest.cc",
279 # Can't resize on Windows Ash. http://crbug.com/165962
280 "magnifier/magnification_controller_unittest.cc",
281 "wm/workspace/workspace_window_resizer_unittest.cc",
282 "sticky_keys/sticky_keys_overlay_unittest.cc",
283 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
284 "autoclick/autoclick_unittest.cc",
287 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
292 cflags = [ "/wd4267" ]
297 "accelerators/magnifier_key_scroller_unittest.cc",
298 "accelerators/spoken_feedback_toggler_unittest.cc",
302 sources += [ "first_run/first_run_helper_unittest.cc" ]
304 "//device/bluetooth",
306 "//ui/display:test_util",
307 "//ui/display/types",
308 #'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP)
309 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
313 "display/resolution_notification_controller_unittest.cc",
314 "touch/touchscreen_util_unittest.cc",
318 if (!use_x11 || !is_chromeos) {
319 sources -= [ "touch/touch_transformer_controller_unittest.cc", ]
322 # TODO(GYP) is this necessary?
323 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
324 # ldflags = "-rdynamic"
326 if (!is_chromeos || use_ozone) {
328 "sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035
333 executable("ash_shell") {
336 "shell/shell_main.cc",
341 "//components/user_manager",
345 configs -= [ "//build/config/win:console" ]
346 configs += [ "//build/config/win:windowed" ]
354 "//device/bluetooth",
359 test("ash_shell_unittests") {
361 "shell/window_watcher_unittest.cc",
362 "test/ash_unittests.cc",
368 "//base/test:test_support",
369 "//components/user_manager",
370 "//content/test:test_support",
373 "//ui/accessibility",
377 deps += [ "//ui/display" ]