Updates the layout text when multiline property has been changed.
[chromium-blink-merge.git] / ash / BUILD.gn
blobed34a59a430b65c4c8a16db12c665a0669fe1c1d
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")
7 import("//testing/test.gni")
9 gypi_values = exec_script("//build/gypi_to_gn.py",
10                           [ rebase_path("ash.gyp") ],
11                           "scope",
12                           [ "ash.gyp" ])
14 component("ash") {
15   sources = gypi_values.ash_sources
17   defines = [ "ASH_IMPLEMENTATION" ]
19   public_deps = [
20     "//ash/resources",
21     "//ash/strings",
22   ]
23   deps = [
24     "//base",
25     "//base:i18n",
26     "//base/third_party/dynamic_annotations",
27     "//cc",
28     "//components/user_manager",
29     "//components/wallpaper",
30     "//content/public/browser",
31     "//media",
32     "//net",
33     "//skia",
34     "//third_party/icu",
35     "//ui/accessibility",
36     "//ui/app_list",
37     "//ui/aura",
38     "//ui/base",
39     "//ui/base/ime",
40     "//ui/compositor",
41     "//ui/events",
42     "//ui/events:events_base",
43     "//ui/events:gesture_detection",
44     "//ui/events/devices",
45     "//ui/gfx",
46     "//ui/gfx/geometry",
47     "//ui/keyboard",
48     "//ui/message_center",
49     "//ui/resources",
50     "//ui/strings",
51     "//ui/views",
52     "//ui/views/controls/webview",
53     "//ui/web_dialogs",
54     "//ui/wm",
55     "//url",
56   ]
58   if (is_win) {
59     sources -= [
60       "sticky_keys/sticky_keys_controller.cc",
61       "sticky_keys/sticky_keys_controller.h",
62     ]
64     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
65     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
66   }
68   if (use_x11) {
69     configs += [
70       "//build/config/linux:x11",
71       "//build/config/linux:xfixes",
72     ]
73     deps += [
74       "//ui/events/platform",
75       "//ui/gfx/x",
76     ]
77   } else {
78     sources -= [
79       "host/ash_window_tree_host_x11.cc",
80       "host/ash_window_tree_host_x11.h",
81       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc",
82       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h",
83     ]
84   }
86   if (use_ozone) {
87     deps += [
88       "//ui/events/ozone:events_ozone",
89       "//ui/ozone",
90     ]
91   }
93   if (is_chromeos) {
94     deps += [
95       "//device/bluetooth",
96       "//ui/display",
97       "//ui/display/util",
98       "//chromeos",
99       "//chromeos:power_manager_proto",
100       "//ui/chromeos/resources",
101       "//ui/chromeos/strings",
102       "//ui/chromeos:ui_chromeos",
103     ]
104   } else {
105     sources -= [
106       "accelerators/key_hold_detector.cc",
107       "accelerators/key_hold_detector.h",
108       "accelerators/magnifier_key_scroller.cc",
109       "accelerators/magnifier_key_scroller.h",
110       "accelerators/spoken_feedback_toggler.cc",
111       "accelerators/spoken_feedback_toggler.h",
112       "display/display_configurator_animation.cc",
113       "display/display_configurator_animation.h",
114       "display/resolution_notification_controller.cc",
115       "display/resolution_notification_controller.h",
116       "system/tray/media_security/media_capture_observer.h",
117       "system/tray/media_security/multi_profile_media_tray_item.cc",
118       "system/tray/media_security/multi_profile_media_tray_item.h",
119       "touch/touch_transformer_controller.cc",
120       "touch/touch_transformer_controller.h",
121       "touch/touchscreen_util.cc",
122       "touch/touchscreen_util.h",
123       "virtual_keyboard_controller.cc",
124       "virtual_keyboard_controller.h",
125     ]
126   }
128   if (!use_ozone) {
129     sources -= [
130       "host/ash_window_tree_host_ozone.cc",
131       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc",
132       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h",
133     ]
134   }
137 component("ash_with_content") {
138   sources = [
139     "content_support/ash_with_content_export.h",
140     "content_support/gpu_support_impl.cc",
141     "content_support/gpu_support_impl.h",
142     "keyboard_overlay/keyboard_overlay_delegate.cc",
143     "keyboard_overlay/keyboard_overlay_delegate.h",
144     "keyboard_overlay/keyboard_overlay_view.cc",
145     "keyboard_overlay/keyboard_overlay_view.h",
146   ]
148   defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
150   public_deps = [
151     ":ash",
152   ]
153   deps = [
154     "//base",
155     "//base/third_party/dynamic_annotations",
156     "//content/public/browser",
157     "//ipc",
158     "//skia",
159     "//ui/aura",
160     "//ui/base",
161     "//ui/compositor",
162     "//ui/events",
163     "//ui/gfx",
164     "//ui/gfx/geometry",
165     "//ui/resources",
166     "//ui/strings",
167     "//ui/views",
168     "//ui/views/controls/webview",
169     "//ui/web_dialogs",
170     "//url",
171   ]
174 static_library("test_support") {
175   testonly = true
176   sources = gypi_values.ash_test_support_sources
178   public_deps = [
179     ":ash",
180   ]
181   deps = [
182     "//ash/resources",
183     "//content/test:test_support",
184     "//skia",
185     "//testing/gtest",
186     "//ui/accessibility",
187     "//ui/app_list",
188     "//ui/app_list:test_support",
189     "//ui/events:events_base",
190     "//ui/events/devices",
191     "//ui/gl",
192     "//ui/views",
193     "//ui/views:test_support",
194   ]
196   if (is_win) {
197     sources += [
198       "test/test_metro_viewer_process_host.cc",
199       "test/test_metro_viewer_process_host.h",
200     ]
201     deps += [
202       "//ipc",
203       "//ui/metro_viewer",
204       "//win8:metro_viewer",
205       "//win8:test_support_win8",
206       "//win8:test_registrar",
207     ]
208   }
211 static_library("ash_shell_lib") {
212   testonly = true
213   sources = gypi_values.ash_shell_lib_sources
215   deps = [
216     ":ash",
217     ":ash_with_content",
218     ":test_support",
219     "//ash/resources",
220     "//ash/strings",
221     "//base",
222     "//base:i18n",
224     #"//chrome:packed_resources",  TODO(GYP)
225     "//content",
226     "//content/shell:content_shell_lib",
227     "//net",
228     "//skia",
229     "//third_party/icu",
230     "//ui/app_list",
231     "//ui/aura",
232     "//ui/base",
233     "//ui/base/ime",
234     "//ui/compositor",
235     "//ui/events",
236     "//ui/events:events_base",
237     "//ui/gfx",
238     "//ui/gfx/geometry",
239     "//ui/keyboard",
240     "//ui/message_center",
241     "//ui/resources",
242     "//ui/views",
243     "//ui/views:test_support",
244     "//ui/views/examples:views_examples_lib",
245     "//ui/views/examples:views_examples_with_content_lib",
246   ]
249 test("ash_unittests") {
250   sources = gypi_values.ash_unittests_sources
252   deps = [
253     ":ash",
254     ":ash_with_content",
255     ":test_support",
256     "//ash/resources",
257     "//ash/strings",
258     "//base",
259     "//base/allocator",
260     "//base/test:test_support",
261     "//components/user_manager",
262     "//content/public/browser",
263     "//content/test:test_support",
264     "//skia",
265     "//testing/gtest",
266     "//third_party/icu",
267     "//ui/accessibility",
268     "//ui/aura",
269     "//ui/aura:test_support",
270     "//ui/base",
271     "//ui/base/ime",
272     "//ui/base:test_support",
273     "//ui/compositor",
274     "//ui/compositor:test_support",
275     "//ui/events",
276     "//ui/events/devices",
277     "//ui/events:test_support",
278     "//ui/events:gesture_detection",
279     "//ui/gfx",
280     "//ui/gfx/geometry",
281     "//ui/keyboard",
282     "//ui/message_center",
283     "//ui/message_center:test_support",
284     "//ui/resources",
285     "//ui/views",
286     "//ui/views:test_support",
287     "//ui/views/controls/webview:test_support",
288     "//ui/web_dialogs:test_support",
289     "//ui/wm",
290     "//url",
291   ]
293   if (!is_chromeos) {
294     sources -= [
295       # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
296       "focus_cycler_unittest.cc",
298       # All tests for multiple displays: not supported on Windows Ash.
299       "wm/drag_window_resizer_unittest.cc",
301       # Accelerometer is only available on Chrome OS.
302       "wm/maximize_mode/maximize_mode_controller_unittest.cc",
304       # Can't resize on Windows Ash. http://crbug.com/165962
305       "autoclick/autoclick_unittest.cc",
306       "magnifier/magnification_controller_unittest.cc",
307       "sticky_keys/sticky_keys_overlay_unittest.cc",
308       "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
309       "virtual_keyboard_controller_unittest.cc",
310       "wm/workspace/workspace_window_resizer_unittest.cc",
311     ]
312     sources += [
313       #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',  TODO(GYP)
314     ]
315   }
317   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
319   if (!use_x11) {
320     sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
321   }
322   if (is_chromeos) {
323     sources += [ "first_run/first_run_helper_unittest.cc" ]
324     deps += [
325       "//device/bluetooth",
326       "//ui/display",
327       "//ui/display:test_util",
328       "//ui/display/types",
329       "//chromeos:power_manager_proto",
330       "//chromeos:test_support_without_gmock",
331     ]
332   } else {
333     sources -= [
334       "accelerators/magnifier_key_scroller_unittest.cc",
335       "accelerators/spoken_feedback_toggler_unittest.cc",
336       "display/resolution_notification_controller_unittest.cc",
337       "touch/touchscreen_util_unittest.cc",
338     ]
339   }
341   if (!use_x11 || !is_chromeos) {
342     sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
343   }
345   # TODO(GYP) is this necessary?
346   #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
347   # ldflags = "-rdynamic"
349   if (!is_chromeos || use_ozone) {
350     sources -= [ "sticky_keys/sticky_keys_unittest.cc" ]  # crbug.com/354035
351   }
354 if (!is_win || link_chrome_on_windows) {
355   executable("ash_shell") {
356     testonly = true
357     sources = [
358       "shell/shell_main.cc",
359     ]
361     deps = [
362       ":ash_shell_lib",
363       "//components/user_manager",
364     ]
366     if (is_win) {
367       configs -= [ "//build/config/win:console" ]
368       configs += [ "//build/config/win:windowed" ]
369       deps += [ "//sandbox" ]
370     }
372     if (is_chromeos) {
373       deps += [ "//device/bluetooth" ]
374     }
375   }
377   test("ash_shell_unittests") {
378     sources = [
379       "shell/window_watcher_unittest.cc",
380       "test/ash_unittests.cc",
381     ]
383     deps = [
384       ":ash_shell_lib",
385       ":test_support",
386       "//base/test:test_support",
387       "//components/user_manager",
388       "//content/test:test_support",
389       "//skia",
390       "//testing/gtest",
391       "//ui/accessibility",
392     ]
394     if (is_chromeos) {
395       deps += [ "//ui/display" ]
396     }
397   }