Specifies background after Widget::Init for frameless app_list.
[chromium-blink-merge.git] / ui / aura / BUILD.gn
blob0a50c0b73096f218776d825750faea04e5247f18
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")
7 component("aura") {
8   sources = [
9     "client/aura_constants.cc",
10     "client/aura_constants.h",
11     "client/capture_client.cc",
12     "client/capture_client.h",
13     "client/capture_delegate.h",
14     "client/cursor_client.cc",
15     "client/cursor_client.h",
16     "client/cursor_client_observer.h",
17     "client/cursor_client_observer.cc",
18     "client/default_capture_client.cc",
19     "client/default_capture_client.h",
20     "client/event_client.cc",
21     "client/event_client.h",
22     "client/focus_change_observer.cc",
23     "client/focus_change_observer.h",
24     "client/focus_client.cc",
25     "client/focus_client.h",
26     "client/screen_position_client.cc",
27     "client/screen_position_client.h",
28     "client/visibility_client.cc",
29     "client/visibility_client.h",
30     "client/window_stacking_client.cc",
31     "client/window_stacking_client.h",
32     "client/window_tree_client.cc",
33     "client/window_tree_client.h",
34     "env.cc",
35     "env.h",
36     "env_observer.h",
37     "input_state_lookup.cc",
38     "input_state_lookup.h",
39     "input_state_lookup_win.cc",
40     "input_state_lookup_win.h",
41     "layout_manager.cc",
42     "layout_manager.h",
43     "remote_window_tree_host_win.cc",
44     "remote_window_tree_host_win.h",
45     "scoped_window_targeter.cc",
46     "scoped_window_targeter.h",
47     "window.cc",
48     "window.h",
49     "window_event_dispatcher.cc",
50     "window_event_dispatcher.h",
51     "window_delegate.h",
52     "window_layer_type.h",
53     "window_observer.cc",
54     "window_observer.h",
55     "window_targeter.cc",
56     "window_targeter.h",
57     "window_tracker.cc",
58     "window_tracker.h",
59     "window_tree_host.cc",
60     "window_tree_host.h",
61     "window_tree_host_mac.mm",
62     "window_tree_host_mac.h",
63     "window_tree_host_observer.h",
64     "window_tree_host_win.cc",
65     "window_tree_host_win.h",
66     "window_tree_host_x11.cc",
67     "window_tree_host_x11.h",
68     "../wm/public/activation_change_observer.h",
69     "../wm/public/activation_change_observer.cc",
70     "../wm/public/activation_client.cc",
71     "../wm/public/activation_client.h",
72     "../wm/public/activation_delegate.cc",
73     "../wm/public/activation_delegate.h",
74     "../wm/public/animation_host.cc",
75     "../wm/public/animation_host.h",
76     "../wm/public/dispatcher_client.cc",
77     "../wm/public/dispatcher_client.h",
78     "../wm/public/drag_drop_client.cc",
79     "../wm/public/drag_drop_client.h",
80     "../wm/public/drag_drop_delegate.cc",
81     "../wm/public/drag_drop_delegate.h",
82     "../wm/public/scoped_tooltip_disabler.cc",
83     "../wm/public/scoped_tooltip_disabler.h",
84     "../wm/public/tooltip_client.cc",
85     "../wm/public/tooltip_client.h",
86     "../wm/public/transient_window_client.cc",
87     "../wm/public/transient_window_client.h",
88     "../wm/public/window_move_client.cc",
89     "../wm/public/window_move_client.h",
90     "../wm/public/window_types.h",
91   ]
93   defines = [
94     "AURA_IMPLEMENTATION",
95   ]
97   deps = [
98     "//base",
99     "//base:i18n",
100     "//base/third_party/dynamic_annotations",
101     "//skia",
102     "//ui/base",
103     "//ui/compositor",
104     "//ui/events",
105     "//ui/events/platform",
106     "//ui/gfx",
107     "//ui/gfx/geometry",
108   ]
110   if (use_x11) {
111     configs += [
112       "//build/config/linux:x11",
113       "//build/config/linux:xrandr",
114     ]
115     deps += [
116       "//ui/events/platform/x11",
117     ]
118   } else {
119     sources -= [
120       "window_tree_host_x11.cc",
121       "window_tree_host_x11.h",
122     ]
123   }
125   if (is_win) {
126     sources -= [
127       "input_state_lookup.cc",
128     ]
130     deps += [
131       "//ui/metro_viewer",
132       "//ipc",
133     ]
134   }
136   if (use_ozone) {
137     sources += [
138       "window_tree_host_ozone.cc",
139       "window_tree_host_ozone.h",
140     ]
142     deps += [
143       "//ui/ozone",
144     ]
145   }
148 source_set("test_support") {
149   testonly = true
150   sources = [
151     "test/aura_test_base.cc",
152     "test/aura_test_base.h",
153     "test/aura_test_helper.cc",
154     "test/aura_test_helper.h",
155     "test/aura_test_utils.cc",
156     "test/aura_test_utils.h",
157     "test/env_test_helper.h",
158     "test/event_generator_delegate_aura.cc",
159     "test/event_generator_delegate_aura.h",
160     "test/test_cursor_client.cc",
161     "test/test_cursor_client.h",
162     "test/test_focus_client.cc",
163     "test/test_focus_client.h",
164     "test/test_screen.cc",
165     "test/test_screen.h",
166     "test/test_window_tree_client.cc",
167     "test/test_window_tree_client.h",
168     "test/test_windows.cc",
169     "test/test_windows.h",
170     "test/test_window_delegate.cc",
171     "test/test_window_delegate.h",
172     "test/ui_controls_factory_aura.h",
173     "test/window_event_dispatcher_test_api.cc",
174     "test/window_event_dispatcher_test_api.h",
175     "test/window_test_api.cc",
176     "test/window_test_api.h",
177   ]
179   public_deps = [
180     ":aura",
181   ]
182   deps = [
183     "//skia",
184     "//testing/gtest",
185     "//ui/base:test_support",
186     "//ui/compositor:test_support",
187     "//ui/events",
188     "//ui/events:events_base",
189     "//ui/events:test_support",
190     "//ui/gfx",
191     "//ui/gfx/geometry",
192     "//ui/wm",
193   ]
195   if (is_win) {
196     cflags = [
197       "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
198     ]
199   }
201   if (use_aura) {
202     if (is_win) {
203       sources += [
204         "test/ui_controls_factory_aurawin.cc",
205       ]
206     }
208     if (use_x11) {
209       sources += [
210         "test/ui_controls_factory_aurax11.cc",
211         "test/x11_event_sender.cc",
212         "test/x11_event_sender.h",
213       ]
214     }
215   }
218 executable("demo") {
219   output_name = "aura_demo"
220   testonly = true
222   sources = [
223     "demo/demo_main.cc",
224   ]
226   deps = [
227     ":aura",
228     ":test_support",
229     "//base",
230     "//base:i18n",
231     "//skia",
232     "//third_party/icu",
233     "//ui/base",
234     "//ui/compositor",
235     "//ui/compositor:test_support",
236     "//ui/events",
237     "//ui/gfx",
238     "//ui/gfx/geometry",
239     "//ui/gl",
240   ]
242   if (use_x11) {
243     deps += [
244       "//ui/gfx/x",
245     ]
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 += [
276       "//ui/gfx/x",
277     ]
278   }
281 test("aura_unittests") {
282   sources = [
283     "gestures/gesture_recognizer_unittest.cc",
284     "test/run_all_unittests.cc",
285     "window_event_dispatcher_unittest.cc",
286     "window_targeter_unittest.cc",
287     "window_unittest.cc",
288   ]
290   deps = [
291     ":test_support",
292     "//base/allocator",
293     "//base/test:test_support",
294     "//skia",
295     "//testing/gtest",
296     "//ui/base:test_support",
297     "//ui/compositor:test_support",
298     "//ui/events:test_support",
299     "//ui/events:gesture_detection",
300     "//ui/gfx",
301     "//ui/gfx/geometry",
302     "//ui/gl",
303   ]
305   if (is_linux) {
306     deps += [
307       "//third_party/mesa",
308     ]
309   }