Add Wi-FI SSID to captive portal interstitial.
[chromium-blink-merge.git] / ash / BUILD.gn
blob2700da75a5b2ab37a288178490f1aa89beb2bdf8
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/accelerometer",
36     "//ui/accessibility",
37     "//ui/app_list",
38     "//ui/aura",
39     "//ui/base",
40     "//ui/compositor",
41     "//ui/events",
42     "//ui/events:events_base",
43     "//ui/events/devices",
44     "//ui/gfx",
45     "//ui/gfx/geometry",
46     "//ui/keyboard",
47     "//ui/message_center",
48     "//ui/resources",
49     "//ui/strings",
50     "//ui/views",
51     "//ui/views/controls/webview",
52     "//ui/web_dialogs",
53     "//ui/wm",
54     "//url",
55   ]
57   if (is_win) {
58     sources -= [
59       "sticky_keys/sticky_keys_controller.cc",
60       "sticky_keys/sticky_keys_controller.h",
61     ]
63     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
64     cflags = [ "/wd4267" ]
65   }
67   if (use_x11) {
68     configs += [
69       "//build/config/linux:x11",
70       "//build/config/linux:xfixes",
71     ]
72     deps += [
73       "//ui/events:gesture_detection",
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 += [ "//ui/ozone" ]
88   }
90   if (is_chromeos) {
91     deps += [
92       "//device/bluetooth",
93       "//ui/display",
94       "//ui/display/util",
95       "//chromeos",
96       "//chromeos:power_manager_proto",
97       "//ui/chromeos/resources",
98       "//ui/chromeos/strings",
99       "//ui/chromeos:ui_chromeos",
100     ]
101   } else {
102     sources -= [
103       "accelerators/key_hold_detector.cc",
104       "accelerators/key_hold_detector.h",
105       "accelerators/magnifier_key_scroller.cc",
106       "accelerators/magnifier_key_scroller.h",
107       "accelerators/spoken_feedback_toggler.cc",
108       "accelerators/spoken_feedback_toggler.h",
109       "display/display_configurator_animation.cc",
110       "display/display_configurator_animation.h",
111       "display/resolution_notification_controller.cc",
112       "display/resolution_notification_controller.h",
113       "system/tray/media_security/media_capture_observer.h",
114       "system/tray/media_security/multi_profile_media_tray_item.cc",
115       "system/tray/media_security/multi_profile_media_tray_item.h",
116       "touch/touch_transformer_controller.cc",
117       "touch/touch_transformer_controller.h",
118       "touch/touchscreen_util.cc",
119       "touch/touchscreen_util.h",
120       "virtual_keyboard_controller.cc",
121       "virtual_keyboard_controller.h",
122     ]
123   }
125   if (!use_ozone) {
126     sources -= [
127       "host/ash_window_tree_host_ozone.cc",
128       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc",
129       "wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h",
130     ]
131   }
134 component("ash_with_content") {
135   sources = [
136     "content_support/ash_with_content_export.h",
137     "content_support/gpu_support_impl.cc",
138     "content_support/gpu_support_impl.h",
139     "keyboard_overlay/keyboard_overlay_delegate.cc",
140     "keyboard_overlay/keyboard_overlay_delegate.h",
141     "keyboard_overlay/keyboard_overlay_view.cc",
142     "keyboard_overlay/keyboard_overlay_view.h",
143   ]
145   defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ]
147   public_deps = [
148     ":ash",
149   ]
150   deps = [
151     "//base",
152     "//base/third_party/dynamic_annotations",
153     "//content/public/browser",
154     "//ipc",
155     "//skia",
156     "//ui/aura",
157     "//ui/base",
158     "//ui/compositor",
159     "//ui/events",
160     "//ui/gfx",
161     "//ui/gfx/geometry",
162     "//ui/resources",
163     "//ui/strings",
164     "//ui/views",
165     "//ui/views/controls/webview",
166     "//ui/web_dialogs",
167     "//url",
168   ]
171 static_library("test_support") {
172   testonly = true
173   sources = gypi_values.ash_test_support_sources
175   public_deps = [
176     ":ash",
177   ]
178   deps = [
179     "//ash/resources",
180     "//content/test:test_support",
181     "//skia",
182     "//testing/gtest",
183     "//ui/accessibility",
184     "//ui/app_list",
185     "//ui/app_list:test_support",
186     "//ui/events:events_base",
187     "//ui/events/devices",
188     "//ui/gl",
189     "//ui/views",
190     "//ui/views:test_support",
191   ]
193   if (is_win) {
194     sources += [
195       "test/test_metro_viewer_process_host.cc",
196       "test/test_metro_viewer_process_host.h",
197     ]
198     deps += [
199       "//ipc",
200       "//ui/metro_viewer",
201       "//win8:metro_viewer",
202       "//win8:test_support_win8",
203       "//win8:test_registrar",
204     ]
205   }
208 static_library("ash_shell_lib") {
209   testonly = true
210   sources = gypi_values.ash_shell_lib_sources
212   deps = [
213     ":ash",
214     ":ash_with_content",
215     ":test_support",
216     "//ash/resources",
217     "//ash/strings",
218     "//base",
219     "//base:i18n",
221     #"//chrome:packed_resources",  TODO(GYP)
222     "//content",
223     "//content/shell:content_shell_lib",
224     "//net",
225     "//skia",
226     "//third_party/icu",
227     "//ui/app_list",
228     "//ui/aura",
229     "//ui/base",
230     "//ui/compositor",
231     "//ui/events",
232     "//ui/events:events_base",
233     "//ui/gfx",
234     "//ui/gfx/geometry",
235     "//ui/keyboard",
236     "//ui/message_center",
237     "//ui/resources",
238     "//ui/views",
239     "//ui/views:test_support",
240     "//ui/views/examples:views_examples_lib",
241     "//ui/views/examples:views_examples_with_content_lib",
242   ]
245 test("ash_unittests") {
246   sources = gypi_values.ash_unittests_sources
248   deps = [
249     ":ash",
250     ":ash_with_content",
251     ":test_support",
252     "//ash/resources",
253     "//ash/strings",
254     "//base",
255     "//base/allocator",
256     "//base/test:test_support",
257     "//components/user_manager",
258     "//content/public/browser",
259     "//content/test:test_support",
260     "//skia",
261     "//testing/gtest",
262     "//third_party/icu",
263     "//ui/accelerometer",
264     "//ui/accessibility",
265     "//ui/aura",
266     "//ui/aura:test_support",
267     "//ui/base",
268     "//ui/base:test_support",
269     "//ui/compositor",
270     "//ui/compositor:test_support",
271     "//ui/events",
272     "//ui/events/devices",
273     "//ui/events:test_support",
274     "//ui/events:gesture_detection",
275     "//ui/gfx",
276     "//ui/gfx/geometry",
277     "//ui/keyboard",
278     "//ui/message_center",
279     "//ui/message_center:test_support",
280     "//ui/resources",
281     "//ui/views",
282     "//ui/views:test_support",
283     "//ui/views/controls/webview:test_support",
284     "//ui/web_dialogs:test_support",
285     "//ui/wm",
286     "//url",
287   ]
289   if (!is_chromeos) {
290     sources -= [
291       # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
292       "focus_cycler_unittest.cc",
294       # All tests for multiple displays: not supported on Windows Ash.
295       "wm/drag_window_resizer_unittest.cc",
297       # Accelerometer is only available on Chrome OS.
298       "wm/maximize_mode/maximize_mode_controller_unittest.cc",
300       # Can't resize on Windows Ash. http://crbug.com/165962
301       "magnifier/magnification_controller_unittest.cc",
302       "wm/workspace/workspace_window_resizer_unittest.cc",
303       "sticky_keys/sticky_keys_overlay_unittest.cc",
304       "system/tray/media_security/multi_profile_media_tray_item_unittest.cc",
305       "autoclick/autoclick_unittest.cc",
306       "virtual_keyboard_controller_unittest.cc",
307     ]
308     sources += [
309       #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',  TODO(GYP)
310     ]
311   }
313   if (is_win) {
314     cflags = [ "/wd4267" ]
315   }
317   if (!use_x11) {
318     sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
319   }
320   if (is_chromeos) {
321     sources += [ "first_run/first_run_helper_unittest.cc" ]
322     deps += [
323       "//device/bluetooth",
324       "//ui/display",
325       "//ui/display:test_util",
326       "//ui/display/types",
327       "//chromeos:power_manager_proto",
328       "//chromeos:test_support_without_gmock",
329     ]
330   } else {
331     sources -= [
332       "accelerators/magnifier_key_scroller_unittest.cc",
333       "accelerators/spoken_feedback_toggler_unittest.cc",
334       "display/resolution_notification_controller_unittest.cc",
335       "touch/touchscreen_util_unittest.cc",
336     ]
337   }
339   if (!use_x11 || !is_chromeos) {
340     sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
341   }
343   # TODO(GYP) is this necessary?
344   #['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
345   # ldflags = "-rdynamic"
347   if (!is_chromeos || use_ozone) {
348     sources -= [ "sticky_keys/sticky_keys_unittest.cc" ]  # crbug.com/354035
349   }
352 executable("ash_shell") {
353   testonly = true
354   sources = [
355     "shell/shell_main.cc",
356   ]
358   deps = [
359     ":ash_shell_lib",
360     "//components/user_manager",
361   ]
363   if (is_win) {
364     configs -= [ "//build/config/win:console" ]
365     configs += [ "//build/config/win:windowed" ]
366     deps += [ "//sandbox" ]
367   }
369   if (is_chromeos) {
370     deps += [ "//device/bluetooth" ]
371   }
374 test("ash_shell_unittests") {
375   sources = [
376     "shell/window_watcher_unittest.cc",
377     "test/ash_unittests.cc",
378   ]
380   deps = [
381     ":ash_shell_lib",
382     ":test_support",
383     "//base/test:test_support",
384     "//components/user_manager",
385     "//content/test:test_support",
386     "//skia",
387     "//testing/gtest",
388     "//ui/accessibility",
389   ]
391   if (is_chromeos) {
392     deps += [ "//ui/display" ]
393   }