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" ]
24 "//base/third_party/dynamic_annotations",
26 "//components/user_manager",
27 "//content/public/browser",
38 "//ui/events:events_base",
42 "//ui/message_center",
46 "//ui/views/controls/webview",
52 forward_dependent_configs_from = [
59 "sticky_keys/sticky_keys_controller.cc",
60 "sticky_keys/sticky_keys_controller.h",
62 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
63 cflags = [ "/wd4267" ]
68 "//build/config/linux:xfixes",
72 "accelerators/key_hold_detector.cc",
73 "accelerators/key_hold_detector.h",
74 "accelerators/magnifier_key_scroller.cc",
75 "accelerators/magnifier_key_scroller.h",
76 "accelerators/spoken_feedback_toggler.cc",
77 "accelerators/spoken_feedback_toggler.h",
86 #'../chromeos/chromeos.gyp:chromeos', TODO(GYP)
87 # Ash #includes power_supply_properties.pb.h directly.
88 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
89 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources', TODO(GYP)
90 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings', TODO(GYP)
91 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos', TODO(GYP)
95 "display/display_configurator_animation.cc",
96 "display/display_configurator_animation.h",
97 "display/resolution_notification_controller.cc",
98 "display/resolution_notification_controller.h",
99 "system/tray/media_security/media_capture_observer.h",
100 "system/tray/media_security/multi_profile_media_tray_item.cc",
101 "system/tray/media_security/multi_profile_media_tray_item.h",
105 if (!use_x11 || !is_chromeos) {
107 "touch/touch_transformer_controller.cc",
108 "touch/touch_transformer_controller.h",
114 "display/mouse_cursor_event_filter_ozone.cc",
120 "host/ash_window_tree_host_ozone.cc",
125 component("ash_with_content") {
127 "content_support/ash_with_content_export.h",
128 "content_support/gpu_support_impl.cc",
129 "content_support/gpu_support_impl.h",
130 "screensaver/screensaver_view.cc",
131 "screensaver/screensaver_view.h",
132 "keyboard_overlay/keyboard_overlay_delegate.cc",
133 "keyboard_overlay/keyboard_overlay_delegate.h",
134 "keyboard_overlay/keyboard_overlay_view.cc",
135 "keyboard_overlay/keyboard_overlay_view.h",
138 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
143 "//base/third_party/dynamic_annotations",
144 "//content/public/browser",
156 "//ui/views/controls/webview",
161 forward_dependent_configs_from = [
166 static_library("test_support") {
167 sources = gypi_values.ash_test_support_sources
172 "//content/test:test_support",
175 "//ui/accessibility",
177 "//ui/app_list:test_support",
178 "//ui/events:events_base",
181 "//ui/views:test_support",
186 "test/test_metro_viewer_process_host.cc",
187 "test/test_metro_viewer_process_host.h",
191 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
192 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
193 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
194 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
199 static_library("ash_shell_lib") {
200 sources = gypi_values.ash_shell_lib_sources
210 #"//chrome:packed_resources", TODO(GYP)
212 "//content/shell:content_shell_lib",
221 "//ui/events:events_base",
225 "//ui/message_center",
228 "//ui/views:test_support",
229 #'../ui/views/examples/examples.gyp:views_examples_lib', TODO(GYP)
230 #'../ui/views/examples/examples.gyp:views_examples_with_content_lib', TODO(GYP)
234 if (false) { # TODO(GYP) enable ash shell and unit tests when they link.
236 test("ash_unittests") {
237 sources = gypi_values.ash_unittests_sources
247 "//base/test:test_support",
248 "//components/user_manager",
249 "//content/public/browser",
250 "//content/test:test_support",
254 "//ui/accessibility",
256 "//ui/aura:test_support",
258 "//ui/base:test_support",
260 "//ui/compositor:test_support",
262 "//ui/events:test_support",
263 "//ui/events:gesture_detection",
267 "//ui/message_center",
268 "//ui/message_center:test_support",
271 "//ui/views:test_support",
272 "//ui/views/controls/webview:test_support",
280 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
281 "focus_cycler_unittest.cc",
282 # All tests for multiple displays: not supported on Windows Ash.
283 "accelerators/nested_dispatcher_controller_unittest.cc",
284 "wm/drag_window_resizer_unittest.cc",
285 # Can't resize on Windows Ash. http://crbug.com/165962
286 "ash_root_window_transformer_unittest.cc",
287 "magnifier/magnification_controller_unittest.cc",
288 "wm/workspace/workspace_window_resizer_unittest.cc",
289 "sticky_keys/sticky_keys_overlay_unittest.cc",
290 "sticky_keys/sticky_keys_unittest.cc",
291 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
292 "autoclick/autoclick_unittest.cc",
295 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
300 cflags = [ "/wd4267" ]
305 "accelerators/magnifier_key_scroller_unittest.cc",
306 "accelerators/spoken_feedback_toggler_unittest.cc",
307 "touch/touch_transformer_controller_unittest.cc",
311 sources += [ "first_run/first_run_helper_unittest.cc" ]
313 "//device/bluetooth",
315 "//ui/display:test_util",
316 "//ui/display/types",
317 #'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP)
318 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
322 "display/resolution_notification_controller_unittest.cc",
323 "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"
333 "sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035
338 executable("ash_shell") {
340 "shell/shell_main.cc",
345 "//components/user_manager",
349 configs -= [ "//build/config/win:console" ]
350 configs += [ "//build/config/win:windowed" ]
358 "../device/bluetooth/bluetooth.gyp:device_bluetooth",
363 test("ash_shell_unittests") {
365 "shell/window_watcher_unittest.cc",
366 "test/ash_unittests.cc",
370 "//base/test:test_support",
371 "//components/user_manager",
372 "//content/test:test_support",
375 "//ui/aaccessibility",
379 deps += [ "//ui/display" ]