ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / ui / aura / BUILD.gn
blobbcf1065d828969849ba40597853b0595fab318fe
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_tooltip_disabler.cc",
25     "../wm/public/scoped_tooltip_disabler.h",
26     "../wm/public/tooltip_client.cc",
27     "../wm/public/tooltip_client.h",
28     "../wm/public/transient_window_client.cc",
29     "../wm/public/transient_window_client.h",
30     "../wm/public/window_move_client.cc",
31     "../wm/public/window_move_client.h",
32     "../wm/public/window_types.h",
33     "client/aura_constants.cc",
34     "client/aura_constants.h",
35     "client/capture_client.cc",
36     "client/capture_client.h",
37     "client/capture_delegate.h",
38     "client/cursor_client.cc",
39     "client/cursor_client.h",
40     "client/cursor_client_observer.cc",
41     "client/cursor_client_observer.h",
42     "client/default_capture_client.cc",
43     "client/default_capture_client.h",
44     "client/event_client.cc",
45     "client/event_client.h",
46     "client/focus_change_observer.cc",
47     "client/focus_change_observer.h",
48     "client/focus_client.cc",
49     "client/focus_client.h",
50     "client/screen_position_client.cc",
51     "client/screen_position_client.h",
52     "client/visibility_client.cc",
53     "client/visibility_client.h",
54     "client/window_stacking_client.cc",
55     "client/window_stacking_client.h",
56     "client/window_tree_client.cc",
57     "client/window_tree_client.h",
58     "env.cc",
59     "env.h",
60     "env_observer.h",
61     "input_state_lookup.cc",
62     "input_state_lookup.h",
63     "input_state_lookup_win.cc",
64     "input_state_lookup_win.h",
65     "layout_manager.cc",
66     "layout_manager.h",
67     "remote_window_tree_host_win.cc",
68     "remote_window_tree_host_win.h",
69     "scoped_window_targeter.cc",
70     "scoped_window_targeter.h",
71     "window.cc",
72     "window.h",
73     "window_delegate.h",
74     "window_event_dispatcher.cc",
75     "window_event_dispatcher.h",
76     "window_layer_type.h",
77     "window_observer.cc",
78     "window_observer.h",
79     "window_targeter.cc",
80     "window_targeter.h",
81     "window_tracker.cc",
82     "window_tracker.h",
83     "window_tree_host.cc",
84     "window_tree_host.h",
85     "window_tree_host_mac.h",
86     "window_tree_host_mac.mm",
87     "window_tree_host_observer.h",
88     "window_tree_host_win.cc",
89     "window_tree_host_win.h",
90     "window_tree_host_x11.cc",
91     "window_tree_host_x11.h",
92   ]
94   defines = [ "AURA_IMPLEMENTATION" ]
96   deps = [
97     "//base",
98     "//base:i18n",
99     "//base/third_party/dynamic_annotations",
100     "//skia",
101     "//ui/base",
102     "//ui/base/ime",
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:events_base",
117       "//ui/events/devices",
118       "//ui/events/platform/x11",
119       "//ui/gfx/x",
120     ]
121   } else {
122     sources -= [
123       "window_tree_host_x11.cc",
124       "window_tree_host_x11.h",
125     ]
126   }
128   if (is_win) {
129     sources -= [ "input_state_lookup.cc" ]
131     deps += [
132       "//ipc",
133       "//ui/metro_viewer",
134       "//ui/platform_window/win:win_window",
135     ]
136   }
138   if (use_ozone) {
139     sources += [
140       "window_tree_host_ozone.cc",
141       "window_tree_host_ozone.h",
142     ]
144     deps += [ "//ui/ozone" ]
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_delegate.cc",
167     "test/test_window_delegate.h",
168     "test/test_window_tree_client.cc",
169     "test/test_window_tree_client.h",
170     "test/test_windows.cc",
171     "test/test_windows.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   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
180   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
182   public_deps = [
183     ":aura",
184   ]
185   deps = [
186     "//skia",
187     "//testing/gtest",
188     "//ui/base:test_support",
189     "//ui/compositor:test_support",
190     "//ui/events",
191     "//ui/events:events_base",
192     "//ui/events:test_support",
193     "//ui/gfx",
194     "//ui/gfx/geometry",
195     "//ui/wm",
196   ]
198   if (is_win) {
199     sources += [ "test/ui_controls_factory_aurawin.cc" ]
200   }
202   if (use_x11) {
203     sources += [
204       "test/ui_controls_factory_aurax11.cc",
205       "test/x11_event_sender.cc",
206       "test/x11_event_sender.h",
207     ]
209     deps += [ "//ui/gfx/x" ]
210   }
212   if (use_ozone) {
213     sources += [ "test/ui_controls_factory_ozone.cc" ]
214   }
217 executable("demo") {
218   output_name = "aura_demo"
219   testonly = true
221   sources = [
222     "demo/demo_main.cc",
223   ]
225   deps = [
226     ":aura",
227     ":test_support",
228     "//base",
229     "//base:i18n",
230     "//skia",
231     "//third_party/icu",
232     "//ui/base",
233     "//ui/compositor",
234     "//ui/compositor:test_support",
235     "//ui/events",
236     "//ui/gfx",
237     "//ui/gfx/geometry",
238     "//ui/gl",
239   ]
241   if (use_x11) {
242     deps += [ "//ui/gfx/x" ]
243   }
246 executable("bench") {
247   output_name = "aura_bench"
248   testonly = true
250   sources = [
251     "bench/bench_main.cc",
252   ]
254   deps = [
255     ":test_support",
256     "//base",
257     "//base:i18n",
258     "//cc",
259     "//gpu/command_buffer/client:gles2_interface",
260     "//skia",
261     "//third_party/icu",
262     "//ui/base",
263     "//ui/compositor",
264     "//ui/compositor:test_support",
265     "//ui/events",
266     "//ui/gfx",
267     "//ui/gfx/geometry",
268     "//ui/gl",
269   ]
271   if (use_x11) {
272     deps += [ "//ui/gfx/x" ]
273   }
276 test("aura_unittests") {
277   sources = [
278     "gestures/gesture_recognizer_unittest.cc",
279     "test/run_all_unittests.cc",
280     "window_event_dispatcher_unittest.cc",
281     "window_targeter_unittest.cc",
282     "window_unittest.cc",
283   ]
285   deps = [
286     ":test_support",
287     "//base/allocator",
288     "//base/test:test_support",
289     "//skia",
290     "//testing/gtest",
291     "//ui/base:test_support",
292     "//ui/compositor:test_support",
293     "//ui/events:test_support",
294     "//ui/events:gesture_detection",
295     "//ui/gfx",
296     "//ui/gfx/geometry",
297     "//ui/gl",
298   ]
300   if (is_linux) {
301     deps += [ "//third_party/mesa" ]
302   }