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 "host/ash_window_tree_host_ozone.cc",
122 component("ash_with_content") {
124 "content_support/ash_with_content_export.h",
125 "content_support/gpu_support_impl.cc",
126 "content_support/gpu_support_impl.h",
127 "screensaver/screensaver_view.cc",
128 "screensaver/screensaver_view.h",
129 "keyboard_overlay/keyboard_overlay_delegate.cc",
130 "keyboard_overlay/keyboard_overlay_delegate.h",
131 "keyboard_overlay/keyboard_overlay_view.cc",
132 "keyboard_overlay/keyboard_overlay_view.h",
135 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
140 "//base/third_party/dynamic_annotations",
141 "//content/public/browser",
153 "//ui/views/controls/webview",
158 forward_dependent_configs_from = [
163 static_library("test_support") {
165 sources = gypi_values.ash_test_support_sources
170 "//content/test:test_support",
173 "//ui/accessibility",
175 "//ui/app_list:test_support",
176 "//ui/events:events_base",
179 "//ui/views:test_support",
182 forward_dependent_configs_from = [ ":ash" ]
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") {
201 sources = gypi_values.ash_shell_lib_sources
211 #"//chrome:packed_resources", TODO(GYP)
213 "//content/shell:content_shell_lib",
222 "//ui/events:events_base",
226 "//ui/message_center",
229 "//ui/views:test_support",
230 "//ui/views/examples:views_examples_lib",
231 "//ui/views/examples:views_examples_with_content_lib",
235 test("ash_unittests") {
236 sources = gypi_values.ash_unittests_sources
246 "//base/test:test_support",
247 "//components/user_manager",
248 "//content/public/browser",
249 "//content/test:test_support",
253 "//ui/accelerometer",
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",
273 "//ui/web_dialogs: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 "wm/drag_window_resizer_unittest.cc",
284 # Can't resize on Windows Ash. http://crbug.com/165962
285 "magnifier/magnification_controller_unittest.cc",
286 "wm/workspace/workspace_window_resizer_unittest.cc",
287 "sticky_keys/sticky_keys_overlay_unittest.cc",
288 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
289 "autoclick/autoclick_unittest.cc",
292 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
297 cflags = [ "/wd4267" ]
302 "accelerators/magnifier_key_scroller_unittest.cc",
303 "accelerators/spoken_feedback_toggler_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/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP)
314 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
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/bluetooth.gyp: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" ]