Revert of Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320) (patchset...
[chromium-blink-merge.git] / ui / aura / BUILD.gn
blob0320ef8e9d119ca83fcc164fd5e28b81594bf7bd
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/platform",
107     "//ui/gfx",
108     "//ui/gfx/geometry",
109   ]
111   if (use_x11) {
112     configs += [
113       "//build/config/linux:x11",
114       "//build/config/linux:xrandr",
115     ]
116     deps += [
117       "//ui/events:events_base",
118       "//ui/events/devices",
119       "//ui/events/platform/x11",
120       "//ui/gfx/x",
121     ]
122   } else {
123     sources -= [
124       "window_tree_host_x11.cc",
125       "window_tree_host_x11.h",
126     ]
127   }
129   if (is_win) {
130     sources -= [ "input_state_lookup.cc" ]
132     deps += [
133       "//ipc",
134       "//ui/metro_viewer",
135       "//ui/platform_window/win:win_window",
136     ]
137   }
139   if (use_ozone) {
140     sources += [
141       "window_tree_host_ozone.cc",
142       "window_tree_host_ozone.h",
143     ]
145     deps += [ "//ui/ozone" ]
146   }
149 source_set("test_support") {
150   testonly = true
151   sources = [
152     "test/aura_test_base.cc",
153     "test/aura_test_base.h",
154     "test/aura_test_helper.cc",
155     "test/aura_test_helper.h",
156     "test/aura_test_utils.cc",
157     "test/aura_test_utils.h",
158     "test/env_test_helper.h",
159     "test/event_generator_delegate_aura.cc",
160     "test/event_generator_delegate_aura.h",
161     "test/test_cursor_client.cc",
162     "test/test_cursor_client.h",
163     "test/test_focus_client.cc",
164     "test/test_focus_client.h",
165     "test/test_screen.cc",
166     "test/test_screen.h",
167     "test/test_window_delegate.cc",
168     "test/test_window_delegate.h",
169     "test/test_window_tree_client.cc",
170     "test/test_window_tree_client.h",
171     "test/test_windows.cc",
172     "test/test_windows.h",
173     "test/ui_controls_factory_aura.h",
174     "test/window_event_dispatcher_test_api.cc",
175     "test/window_event_dispatcher_test_api.h",
176     "test/window_test_api.cc",
177     "test/window_test_api.h",
178   ]
180   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
181   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
183   public_deps = [
184     ":aura",
185   ]
186   deps = [
187     "//skia",
188     "//testing/gtest",
189     "//ui/base:test_support",
190     "//ui/base/ime",
191     "//ui/compositor:test_support",
192     "//ui/events",
193     "//ui/events:events_base",
194     "//ui/events:test_support",
195     "//ui/gfx",
196     "//ui/gfx/geometry",
197     "//ui/wm",
198   ]
200   if (is_win) {
201     sources += [ "test/ui_controls_factory_aurawin.cc" ]
202   }
204   if (use_x11) {
205     sources += [
206       "test/ui_controls_factory_aurax11.cc",
207       "test/x11_event_sender.cc",
208       "test/x11_event_sender.h",
209     ]
211     deps += [ "//ui/gfx/x" ]
212   }
214   if (use_ozone) {
215     sources += [ "test/ui_controls_factory_ozone.cc" ]
216   }
219 executable("demo") {
220   output_name = "aura_demo"
221   testonly = true
223   sources = [
224     "demo/demo_main.cc",
225   ]
227   deps = [
228     ":aura",
229     ":test_support",
230     "//base",
231     "//base:i18n",
232     "//skia",
233     "//third_party/icu",
234     "//ui/base",
235     "//ui/compositor",
236     "//ui/compositor:test_support",
237     "//ui/events",
238     "//ui/gfx",
239     "//ui/gfx/geometry",
240     "//ui/gl",
241   ]
243   if (use_x11) {
244     deps += [ "//ui/gfx/x" ]
245   }
248 executable("bench") {
249   output_name = "aura_bench"
250   testonly = true
252   sources = [
253     "bench/bench_main.cc",
254   ]
256   deps = [
257     ":test_support",
258     "//base",
259     "//base:i18n",
260     "//cc",
261     "//gpu/command_buffer/client:gles2_interface",
262     "//skia",
263     "//third_party/icu",
264     "//ui/base",
265     "//ui/compositor",
266     "//ui/compositor:test_support",
267     "//ui/events",
268     "//ui/gfx",
269     "//ui/gfx/geometry",
270     "//ui/gl",
271   ]
273   if (use_x11) {
274     deps += [ "//ui/gfx/x" ]
275   }
278 test("aura_unittests") {
279   sources = [
280     "gestures/gesture_recognizer_unittest.cc",
281     "test/run_all_unittests.cc",
282     "window_event_dispatcher_unittest.cc",
283     "window_targeter_unittest.cc",
284     "window_unittest.cc",
285   ]
287   deps = [
288     ":test_support",
289     "//base/allocator",
290     "//base/test:test_support",
291     "//skia",
292     "//testing/gtest",
293     "//ui/base:test_support",
294     "//ui/compositor:test_support",
295     "//ui/events:test_support",
296     "//ui/events:gesture_detection",
297     "//ui/gfx",
298     "//ui/gfx/geometry",
299     "//ui/gl",
300   ]
302   if (is_linux) {
303     deps += [ "//third_party/mesa" ]
304   }