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",
39 "//ui/events:events_base",
43 "//ui/message_center",
47 "//ui/views/controls/webview",
53 forward_dependent_configs_from = [
60 "sticky_keys/sticky_keys_controller.cc",
61 "sticky_keys/sticky_keys_controller.h",
63 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
64 cflags = [ "/wd4267" ]
69 "//build/config/linux:xfixes",
73 "accelerators/key_hold_detector.cc",
74 "accelerators/key_hold_detector.h",
75 "accelerators/magnifier_key_scroller.cc",
76 "accelerators/magnifier_key_scroller.h",
77 "accelerators/spoken_feedback_toggler.cc",
78 "accelerators/spoken_feedback_toggler.h",
87 #'../chromeos/chromeos.gyp:chromeos', TODO(GYP)
88 # Ash #includes power_supply_properties.pb.h directly.
89 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
90 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources', TODO(GYP)
91 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings', TODO(GYP)
92 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos', TODO(GYP)
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",
106 if (!use_x11 || !is_chromeos) {
108 "touch/touch_transformer_controller.cc",
109 "touch/touch_transformer_controller.h",
110 "touch/touchscreen_util.cc",
111 "touch/touchscreen_util.h",
117 "display/mouse_cursor_event_filter_ozone.cc",
123 "host/ash_window_tree_host_ozone.cc",
128 component("ash_with_content") {
130 "content_support/ash_with_content_export.h",
131 "content_support/gpu_support_impl.cc",
132 "content_support/gpu_support_impl.h",
133 "screensaver/screensaver_view.cc",
134 "screensaver/screensaver_view.h",
135 "keyboard_overlay/keyboard_overlay_delegate.cc",
136 "keyboard_overlay/keyboard_overlay_delegate.h",
137 "keyboard_overlay/keyboard_overlay_view.cc",
138 "keyboard_overlay/keyboard_overlay_view.h",
141 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
146 "//base/third_party/dynamic_annotations",
147 "//content/public/browser",
159 "//ui/views/controls/webview",
164 forward_dependent_configs_from = [
169 static_library("test_support") {
171 sources = gypi_values.ash_test_support_sources
176 "//content/test:test_support",
179 "//ui/accessibility",
181 "//ui/app_list:test_support",
182 "//ui/events:events_base",
185 "//ui/views:test_support",
188 forward_dependent_configs_from = [ ":ash" ]
192 "test/test_metro_viewer_process_host.cc",
193 "test/test_metro_viewer_process_host.h",
197 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP)
198 #'../win8/win8.gyp:metro_viewer', TODO(GYP)
199 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
200 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP)
205 static_library("ash_shell_lib") {
207 sources = gypi_values.ash_shell_lib_sources
217 #"//chrome:packed_resources", TODO(GYP)
219 "//content/shell:content_shell_lib",
228 "//ui/events:events_base",
232 "//ui/message_center",
235 "//ui/views:test_support",
236 "//ui/views/examples:views_examples_lib",
237 "//ui/views/examples:views_examples_with_content_lib",
241 test("ash_unittests") {
242 sources = gypi_values.ash_unittests_sources
252 "//base/test:test_support",
253 "//components/user_manager",
254 "//content/public/browser",
255 "//content/test:test_support",
259 "//ui/accelerometer",
260 "//ui/accessibility",
262 "//ui/aura:test_support",
264 "//ui/base:test_support",
266 "//ui/compositor:test_support",
268 "//ui/events:test_support",
269 "//ui/events:gesture_detection",
273 "//ui/message_center",
274 "//ui/message_center:test_support",
277 "//ui/views:test_support",
278 "//ui/views/controls/webview:test_support",
279 "//ui/web_dialogs:test_support",
286 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
287 "focus_cycler_unittest.cc",
288 # All tests for multiple displays: not supported on Windows Ash.
289 "wm/drag_window_resizer_unittest.cc",
290 # Can't resize on Windows Ash. http://crbug.com/165962
291 "magnifier/magnification_controller_unittest.cc",
292 "wm/workspace/workspace_window_resizer_unittest.cc",
293 "sticky_keys/sticky_keys_overlay_unittest.cc",
294 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
295 "autoclick/autoclick_unittest.cc",
298 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
303 cflags = [ "/wd4267" ]
308 "accelerators/magnifier_key_scroller_unittest.cc",
309 "accelerators/spoken_feedback_toggler_unittest.cc",
313 sources += [ "first_run/first_run_helper_unittest.cc" ]
315 "//device/bluetooth",
317 "//ui/display:test_util",
318 "//ui/display/types",
319 #'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP)
320 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
324 "display/resolution_notification_controller_unittest.cc",
325 "touch/touchscreen_util_unittest.cc",
329 if (!use_x11 || !is_chromeos) {
330 sources -= [ "touch/touch_transformer_controller_unittest.cc", ]
333 # TODO(GYP) is this necessary?
334 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
335 # ldflags = "-rdynamic"
337 if (!is_chromeos || use_ozone) {
339 "sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035
344 executable("ash_shell") {
347 "shell/shell_main.cc",
352 "//components/user_manager",
356 configs -= [ "//build/config/win:console" ]
357 configs += [ "//build/config/win:windowed" ]
365 "../device/bluetooth/bluetooth.gyp:device_bluetooth",
370 test("ash_shell_unittests") {
372 "shell/window_watcher_unittest.cc",
373 "test/ash_unittests.cc",
379 "//base/test:test_support",
380 "//components/user_manager",
381 "//content/test:test_support",
384 "//ui/accessibility",
388 deps += [ "//ui/display" ]