Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / aura / BUILD.gn
blob607b75b5ed7754f6346495f26728c0bdac93f9ce
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/ui.gni")
6 import("//testing/test.gni")
8 component("aura") {
9   sources = [
10     "../wm/public/activation_change_observer.cc",
11     "../wm/public/activation_change_observer.h",
12     "../wm/public/activation_client.cc",
13     "../wm/public/activation_client.h",
14     "../wm/public/activation_delegate.cc",
15     "../wm/public/activation_delegate.h",
16     "../wm/public/animation_host.cc",
17     "../wm/public/animation_host.h",
18     "../wm/public/dispatcher_client.cc",
19     "../wm/public/dispatcher_client.h",
20     "../wm/public/drag_drop_client.cc",
21     "../wm/public/drag_drop_client.h",
22     "../wm/public/drag_drop_delegate.cc",
23     "../wm/public/drag_drop_delegate.h",
24     "../wm/public/scoped_drag_drop_disabler.cc",
25     "../wm/public/scoped_drag_drop_disabler.h",
26     "../wm/public/scoped_tooltip_disabler.cc",
27     "../wm/public/scoped_tooltip_disabler.h",
28     "../wm/public/tooltip_client.cc",
29     "../wm/public/tooltip_client.h",
30     "../wm/public/transient_window_client.cc",
31     "../wm/public/transient_window_client.h",
32     "../wm/public/window_move_client.cc",
33     "../wm/public/window_move_client.h",
34     "../wm/public/window_types.h",
35     "client/aura_constants.cc",
36     "client/aura_constants.h",
37     "client/capture_client.cc",
38     "client/capture_client.h",
39     "client/capture_delegate.h",
40     "client/cursor_client.cc",
41     "client/cursor_client.h",
42     "client/cursor_client_observer.cc",
43     "client/cursor_client_observer.h",
44     "client/default_capture_client.cc",
45     "client/default_capture_client.h",
46     "client/event_client.cc",
47     "client/event_client.h",
48     "client/focus_change_observer.cc",
49     "client/focus_change_observer.h",
50     "client/focus_client.cc",
51     "client/focus_client.h",
52     "client/screen_position_client.cc",
53     "client/screen_position_client.h",
54     "client/visibility_client.cc",
55     "client/visibility_client.h",
56     "client/window_stacking_client.cc",
57     "client/window_stacking_client.h",
58     "client/window_tree_client.cc",
59     "client/window_tree_client.h",
60     "env.cc",
61     "env.h",
62     "env_observer.h",
63     "input_state_lookup.cc",
64     "input_state_lookup.h",
65     "input_state_lookup_win.cc",
66     "input_state_lookup_win.h",
67     "layout_manager.cc",
68     "layout_manager.h",
69     "remote_window_tree_host_win.cc",
70     "remote_window_tree_host_win.h",
71     "scoped_window_targeter.cc",
72     "scoped_window_targeter.h",
73     "window.cc",
74     "window.h",
75     "window_delegate.h",
76     "window_event_dispatcher.cc",
77     "window_event_dispatcher.h",
78     "window_observer.cc",
79     "window_observer.h",
80     "window_targeter.cc",
81     "window_targeter.h",
82     "window_tracker.cc",
83     "window_tracker.h",
84     "window_tree_host.cc",
85     "window_tree_host.h",
86     "window_tree_host_mac.h",
87     "window_tree_host_mac.mm",
88     "window_tree_host_observer.h",
89     "window_tree_host_win.cc",
90     "window_tree_host_win.h",
91     "window_tree_host_x11.cc",
92     "window_tree_host_x11.h",
93   ]
95   defines = [ "AURA_IMPLEMENTATION" ]
97   deps = [
98     "//base",
99     "//base:i18n",
100     "//base/third_party/dynamic_annotations",
101     "//skia",
102     "//ui/base",
103     "//ui/base/ime",
104     "//ui/compositor",
105     "//ui/events",
106     "//ui/events:events_base",
107     "//ui/events/platform",
108     "//ui/gfx",
109     "//ui/gfx/geometry",
110   ]
112   if (use_x11) {
113     configs += [
114       "//build/config/linux:x11",
115       "//build/config/linux:xrandr",
116     ]
117     deps += [
118       "//ui/events:events_base",
119       "//ui/events/devices",
120       "//ui/events/platform/x11",
121       "//ui/gfx/x",
122     ]
123   } else {
124     sources -= [
125       "window_tree_host_x11.cc",
126       "window_tree_host_x11.h",
127     ]
128   }
130   if (is_win) {
131     sources -= [ "input_state_lookup.cc" ]
133     deps += [
134       "//ipc",
135       "//ui/metro_viewer",
136       "//ui/platform_window/win",
137     ]
138   }
140   if (use_ozone) {
141     sources += [
142       "window_tree_host_ozone.cc",
143       "window_tree_host_ozone.h",
144     ]
146     deps += [ "//ui/ozone" ]
147   }
150 source_set("test_support") {
151   testonly = true
152   sources = [
153     "test/aura_test_base.cc",
154     "test/aura_test_base.h",
155     "test/aura_test_helper.cc",
156     "test/aura_test_helper.h",
157     "test/aura_test_utils.cc",
158     "test/aura_test_utils.h",
159     "test/env_test_helper.h",
160     "test/event_generator_delegate_aura.cc",
161     "test/event_generator_delegate_aura.h",
162     "test/test_cursor_client.cc",
163     "test/test_cursor_client.h",
164     "test/test_focus_client.cc",
165     "test/test_focus_client.h",
166     "test/test_screen.cc",
167     "test/test_screen.h",
168     "test/test_window_delegate.cc",
169     "test/test_window_delegate.h",
170     "test/test_window_tree_client.cc",
171     "test/test_window_tree_client.h",
172     "test/test_windows.cc",
173     "test/test_windows.h",
174     "test/ui_controls_factory_aura.h",
175     "test/window_event_dispatcher_test_api.cc",
176     "test/window_event_dispatcher_test_api.h",
177     "test/window_test_api.cc",
178     "test/window_test_api.h",
179   ]
181   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
182   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
184   public_deps = [
185     ":aura",
186   ]
187   deps = [
188     "//skia",
189     "//testing/gtest",
190     "//ui/base:test_support",
191     "//ui/base/ime",
192     "//ui/compositor:test_support",
193     "//ui/events",
194     "//ui/events:events_base",
195     "//ui/events:test_support",
196     "//ui/gfx",
197     "//ui/gfx/geometry",
198     "//ui/wm",
199   ]
201   if (is_win) {
202     sources += [ "test/ui_controls_factory_aurawin.cc" ]
203   }
205   if (use_x11) {
206     sources += [
207       "test/ui_controls_factory_aurax11.cc",
208       "test/x11_event_sender.cc",
209       "test/x11_event_sender.h",
210     ]
212     deps += [ "//ui/gfx/x" ]
213   }
215   if (use_ozone) {
216     sources += [ "test/ui_controls_factory_ozone.cc" ]
217   }
220 executable("demo") {
221   output_name = "aura_demo"
222   testonly = true
224   sources = [
225     "demo/demo_main.cc",
226   ]
228   deps = [
229     ":aura",
230     ":test_support",
231     "//base",
232     "//base:i18n",
233     "//skia",
234     "//third_party/icu",
235     "//ui/base",
236     "//ui/compositor",
237     "//ui/compositor:test_support",
238     "//ui/events",
239     "//ui/gfx",
240     "//ui/gfx/geometry",
241     "//ui/gl",
242   ]
244   if (use_x11) {
245     deps += [ "//ui/gfx/x" ]
246   }
249 executable("bench") {
250   output_name = "aura_bench"
251   testonly = true
253   sources = [
254     "bench/bench_main.cc",
255   ]
257   deps = [
258     ":test_support",
259     "//base",
260     "//base:i18n",
261     "//cc",
262     "//gpu/command_buffer/client:gles2_interface",
263     "//skia",
264     "//third_party/icu",
265     "//ui/base",
266     "//ui/compositor",
267     "//ui/compositor:test_support",
268     "//ui/events",
269     "//ui/gfx",
270     "//ui/gfx/geometry",
271     "//ui/gl",
272   ]
274   if (use_x11) {
275     deps += [ "//ui/gfx/x" ]
276   }
279 # TODO(GYP): Delete this after we've converted everything to GN.
280 # The _run targets exist only for compatibility w/ GYP.
281 group("aura_unittests_run") {
282   testonly = true
283   deps = [
284     ":aura_unittests",
285   ]
288 test("aura_unittests") {
289   sources = [
290     "gestures/gesture_recognizer_unittest.cc",
291     "test/run_all_unittests.cc",
292     "window_event_dispatcher_unittest.cc",
293     "window_targeter_unittest.cc",
294     "window_unittest.cc",
295   ]
297   deps = [
298     ":test_support",
299     "//base/allocator",
300     "//base/test:test_support",
301     "//skia",
302     "//testing/gtest",
303     "//ui/base:test_support",
304     "//ui/compositor:test_support",
305     "//ui/events:test_support",
306     "//ui/events:gesture_detection",
307     "//ui/gfx",
308     "//ui/gfx/geometry",
309     "//ui/gl",
310   ]
312   if (is_linux) {
313     deps += [ "//third_party/mesa" ]
314   }
316   data_deps = [ "//third_party/mesa:osmesa" ]