Introduce proximity_auth component.
[chromium-blink-merge.git] / ui / aura / BUILD.gn
blobb5f08499f5b74c8470f3b745fffd907f5e65abe6
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   ]
92   defines = [
93     "AURA_IMPLEMENTATION",
94   ]
96   deps = [
97     "//base",
98     "//base:i18n",
99     "//base/third_party/dynamic_annotations",
100     "//skia",
101     "//ui/base",
102     "//ui/compositor",
103     "//ui/events",
104     "//ui/events/platform",
105     "//ui/gfx",
106     "//ui/gfx/geometry",
107   ]
109   if (use_x11) {
110     configs += [
111       "//build/config/linux:x11",
112       "//build/config/linux:xrandr",
113     ]
114     deps += [
115       "//ui/events/platform/x11",
116     ]
117   }
119   if (is_win) {
120     sources -= [
121       "input_state_lookup.cc",
122     ]
124     deps += [
125       "//ui/metro_viewer",
126       "//ipc",
127     ]
128   }
130   if (use_ozone) {
131     sources += [
132       "window_tree_host_ozone.cc",
133       "window_tree_host_ozone.h",
134     ]
136     # TODO(GYP) enable when these targets exist.
137     #deps += [
138     #  "//ui/events/ozone",
139     #  "//ui/ozone",
140     #]
141   }
144 source_set("test_support") {
145   sources = [
146     "test/aura_test_base.cc",
147     "test/aura_test_base.h",
148     "test/aura_test_helper.cc",
149     "test/aura_test_helper.h",
150     "test/aura_test_utils.cc",
151     "test/aura_test_utils.h",
152     "test/env_test_helper.h",
153     "test/event_generator_delegate_aura.cc",
154     "test/event_generator_delegate_aura.h",
155     "test/test_cursor_client.cc",
156     "test/test_cursor_client.h",
157     "test/test_focus_client.cc",
158     "test/test_focus_client.h",
159     "test/test_screen.cc",
160     "test/test_screen.h",
161     "test/test_window_tree_client.cc",
162     "test/test_window_tree_client.h",
163     "test/test_windows.cc",
164     "test/test_windows.h",
165     "test/test_window_delegate.cc",
166     "test/test_window_delegate.h",
167     "test/ui_controls_factory_aura.h",
168     "test/window_event_dispatcher_test_api.cc",
169     "test/window_event_dispatcher_test_api.h",
170     "test/window_test_api.cc",
171     "test/window_test_api.h",
172   ]
174   deps = [
175     ":aura",
176     "//skia",
177     "//testing/gtest",
178     "//ui/base",
179     "//ui/base:test_support",
180     "//ui/compositor:test_support",
181     "//ui/events",
182     "//ui/events:events_base",
183     "//ui/events:test_support",
184     "//ui/gfx",
185     "//ui/gfx/geometry",
186   ]
188   if (is_win) {
189     cflags = [
190       "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
191     ]
192   }
194   if (use_aura) {
195     if (is_win) {
196       sources += [
197         "test/ui_controls_factory_aurawin.cc",
198       ]
199     }
201     if (use_x11) {
202       sources += [
203         "test/ui_controls_factory_aurax11.cc",
204       ]
205     }
206   }
209 executable("demo") {
210   output_name = "aura_demo"
211   sources = [
212     "demo/demo_main.cc",
213   ]
215   deps = [
216     ":aura",
217     ":test_support",
218     "//base",
219     "//base:i18n",
220     "//skia",
221     "//third_party/icu",
222     "//ui/base",
223     "//ui/compositor",
224     "//ui/compositor:test_support",
225     "//ui/events",
226     "//ui/gfx",
227     "//ui/gfx/geometry",
228     "//ui/gl",
229   ]
231   if (use_x11) {
232     deps += [
233       "//ui/gfx/x",
234     ]
235   }
238 executable("bench") {
239   output_name = "aura_bench"
240   sources = [
241     "bench/bench_main.cc",
242   ]
244   deps = [
245     ":aura",
246     ":test_support",
247     "//base",
248     "//base:i18n",
249     "//cc",
250     "//skia",
251     "//third_party/icu",
252     "//ui/base",
253     "//ui/compositor",
254     "//ui/compositor:test_support",
255     "//ui/events",
256     "//ui/gfx",
257     "//ui/gfx/geometry",
258     "//ui/gl",
259   ]
261   if (use_x11) {
262     deps += [
263       "//ui/gfx/x",
264     ]
265   }
268 test("unittests") {
269   output_name = "aura_unittests"
270   sources = [
271     "gestures/gesture_recognizer_unittest.cc",
272     "test/run_all_unittests.cc",
273     "window_event_dispatcher_unittest.cc",
274     "window_targeter_unittest.cc",
275     "window_unittest.cc",
276   ]
278   deps = [
279     ":aura",
280     ":test_support",
281     "//base/allocator",
282     "//base/test:test_support",
283     "//skia",
284     "//testing/gtest",
285     "//ui/base",
286     "//ui/base:test_support",
287     "//ui/compositor",
288     "//ui/compositor:test_support",
289     "//ui/events",
290     "//ui/events:events_base",
291     "//ui/events:gesture_detection",
292     "//ui/gfx",
293     "//ui/gfx/geometry",
294     "//ui/gl",
295   ]
297   if (is_linux) {
298     deps += [
299       "//third_party/mesa",
300     ]
301   }