Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: ui/events/BUILD.gn

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/window_manager/view_targeter_unittest.cc ('k') | ui/events/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/ui.gni") 5 import("//build/config/ui.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 static_library("dom4_keycode_converter") { 8 static_library("dom_keycode_converter") {
9 sources = [ 9 sources = [
10 "keycodes/dom4/keycode_converter.cc", 10 "keycodes/dom/dom_code.h",
11 "keycodes/dom4/keycode_converter.h", 11 "keycodes/dom/dom_key.h",
12 "keycodes/dom4/keycode_converter_data.h", 12 "keycodes/dom/dom_key_data.inc",
13 "keycodes/dom/keycode_converter.cc",
14 "keycodes/dom/keycode_converter.h",
15 "keycodes/dom/keycode_converter_data.inc",
13 ] 16 ]
14 17
15 deps = [ 18 deps = [
16 "//base", 19 "//base",
17 ] 20 ]
18 } 21 }
19 22
20 component("events_base") { 23 component("events_base") {
21 sources = [ 24 sources = [
22 "device_data_manager.cc", 25 "base_event_utils.cc",
23 "device_data_manager.h", 26 "base_event_utils.h",
24 "device_hotplug_event_observer.h",
25 "event_constants.h", 27 "event_constants.h",
26 "event_switches.cc", 28 "event_switches.cc",
27 "event_switches.h", 29 "event_switches.h",
28 "events_base_export.h", 30 "events_base_export.h",
29 "gesture_curve.h", 31 "gesture_curve.h",
30 "gesture_event_details.cc", 32 "gesture_event_details.cc",
31 "gesture_event_details.h", 33 "gesture_event_details.h",
32 "gestures/fling_curve.cc", 34 "gestures/fling_curve.cc",
33 "gestures/fling_curve.h", 35 "gestures/fling_curve.h",
34 "gestures/gesture_configuration.cc", 36 "keycodes/dom_us_layout_data.h",
35 "gestures/gesture_configuration.h",
36 "keycodes/keyboard_code_conversion.cc", 37 "keycodes/keyboard_code_conversion.cc",
37 "keycodes/keyboard_code_conversion.h", 38 "keycodes/keyboard_code_conversion.h",
38 "keycodes/keyboard_code_conversion_android.cc", 39 "keycodes/keyboard_code_conversion_android.cc",
39 "keycodes/keyboard_code_conversion_android.h", 40 "keycodes/keyboard_code_conversion_android.h",
40 "keycodes/keyboard_codes.h", 41 "keycodes/keyboard_codes.h",
41 "latency_info.cc", 42 "latency_info.cc",
42 "latency_info.h", 43 "latency_info.h",
43 "touchscreen_device.cc",
44 "touchscreen_device.h",
45 ] 44 ]
46 45
47 defines = [ "EVENTS_BASE_IMPLEMENTATION" ] 46 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
48 47
49 deps = [ 48 deps = [
50 ":dom4_keycode_converter", 49 ":dom_keycode_converter",
51 "//base/third_party/dynamic_annotations", 50 "//base/third_party/dynamic_annotations",
52 "//skia", 51 "//skia",
53 ] 52 ]
54 53
55 public_deps = [ 54 public_deps = [
56 "//base", 55 "//base",
56 "//ui/events/platform",
57 "//ui/gfx", 57 "//ui/gfx",
58 "//ui/gfx/geometry", 58 "//ui/gfx/geometry",
59 ] 59 ]
60
61 if (use_x11) {
62 configs += [ "//build/config/linux:x11" ]
63
64 sources += [
65 "keycodes/keyboard_code_conversion_x.cc",
66 "keycodes/keyboard_code_conversion_x.h",
67 "x/keysym_to_unicode.cc",
68 "x/keysym_to_unicode.h",
69 ]
70
71 deps += [ "//ui/gfx/x" ]
72 }
73
74 if (use_x11 || use_ozone) {
75 sources += [
76 "keycodes/keyboard_code_conversion_xkb.cc",
77 "keycodes/keyboard_code_conversion_xkb.h",
78 "keycodes/xkb_keysym.h",
79 ]
80 }
60 } 81 }
61 82
62 component("events") { 83 component("events") {
63 sources = [ 84 sources = [
64 "event.cc", 85 "event.cc",
65 "event.h", 86 "event.h",
66 "event_dispatcher.cc", 87 "event_dispatcher.cc",
67 "event_dispatcher.h", 88 "event_dispatcher.h",
68 "event_handler.cc", 89 "event_handler.cc",
69 "event_handler.h", 90 "event_handler.h",
70 "event_processor.cc", 91 "event_processor.cc",
71 "event_processor.h", 92 "event_processor.h",
72 "event_rewriter.h", 93 "event_rewriter.h",
73 "event_source.cc", 94 "event_source.cc",
74 "event_source.h", 95 "event_source.h",
75 "event_target.cc", 96 "event_target.cc",
76 "event_target.h", 97 "event_target.h",
77 "event_target_iterator.h", 98 "event_target_iterator.h",
78 "event_targeter.cc",
79 "event_targeter.h", 99 "event_targeter.h",
80 "event_utils.cc", 100 "event_utils.cc",
81 "event_utils.h", 101 "event_utils.h",
82 "events_export.h", 102 "events_export.h",
103 "events_stub.cc",
83 "gestures/gesture_provider_impl.cc", 104 "gestures/gesture_provider_impl.cc",
84 "gestures/gesture_provider_impl.h", 105 "gestures/gesture_provider_impl.h",
85 "gestures/gesture_recognizer.h", 106 "gestures/gesture_recognizer.h",
86 "gestures/gesture_recognizer_impl.cc", 107 "gestures/gesture_recognizer_impl.cc",
87 "gestures/gesture_recognizer_impl.h", 108 "gestures/gesture_recognizer_impl.h",
88 "gestures/gesture_types.h", 109 "gestures/gesture_types.h",
89 "gestures/motion_event_impl.cc", 110 "gestures/motion_event_impl.cc",
90 "gestures/motion_event_impl.h", 111 "gestures/motion_event_impl.h",
112 "null_event_targeter.cc",
113 "null_event_targeter.h",
91 ] 114 ]
92 115
93 defines = [ "EVENTS_IMPLEMENTATION" ] 116 defines = [ "EVENTS_IMPLEMENTATION" ]
94 117
95 public_deps = [ 118 public_deps = [
96 ":events_base", 119 ":events_base",
97 ] 120 ]
98 deps = [ 121 deps = [
99 ":dom4_keycode_converter", 122 ":dom_keycode_converter",
100 ":gesture_detection", 123 ":gesture_detection",
101 "//base/third_party/dynamic_annotations", 124 "//base/third_party/dynamic_annotations",
102 "//skia", 125 "//skia",
103 "//ui/gfx", 126 "//ui/gfx",
104 "//ui/gfx/geometry", 127 "//ui/gfx/geometry",
105 ] 128 ]
129
130 if (use_x11) {
131 sources += [ "x/events_x.cc" ]
132 configs += [
133 "//build/config/linux:glib",
134 "//build/config/linux:x11",
135 ]
136 deps += [
137 "//ui/events/devices",
138 "//ui/gfx/x",
139 ]
140 }
141
142 if (use_ozone) {
143 sources += [ "ozone/events_ozone.cc" ]
144 deps += [ "//ui/events/ozone:events_ozone_layout" ]
145 }
146
147 if (is_win || is_mac || use_x11 || use_ozone) {
148 sources -= [ "events_stub.cc" ]
149 }
106 } 150 }
107 151
108 component("gesture_detection") { 152 component("gesture_detection") {
109 sources = [ 153 sources = [
110 "gesture_detection/bitset_32.h", 154 "gesture_detection/bitset_32.h",
111 "gesture_detection/filtered_gesture_provider.cc", 155 "gesture_detection/filtered_gesture_provider.cc",
112 "gesture_detection/filtered_gesture_provider.h", 156 "gesture_detection/filtered_gesture_provider.h",
113 "gesture_detection/gesture_config_helper.h", 157 "gesture_detection/gesture_configuration.cc",
114 "gesture_detection/gesture_config_helper_aura.cc", 158 "gesture_detection/gesture_configuration.h",
115 "gesture_detection/gesture_detection_export.h", 159 "gesture_detection/gesture_detection_export.h",
116 "gesture_detection/gesture_detector.cc", 160 "gesture_detection/gesture_detector.cc",
117 "gesture_detection/gesture_detector.h", 161 "gesture_detection/gesture_detector.h",
118 "gesture_detection/gesture_event_data.cc", 162 "gesture_detection/gesture_event_data.cc",
119 "gesture_detection/gesture_event_data.h", 163 "gesture_detection/gesture_event_data.h",
120 "gesture_detection/gesture_event_data_packet.cc", 164 "gesture_detection/gesture_event_data_packet.cc",
121 "gesture_detection/gesture_event_data_packet.h", 165 "gesture_detection/gesture_event_data_packet.h",
122 "gesture_detection/gesture_listeners.cc", 166 "gesture_detection/gesture_listeners.cc",
123 "gesture_detection/gesture_listeners.h", 167 "gesture_detection/gesture_listeners.h",
124 "gesture_detection/gesture_provider.cc", 168 "gesture_detection/gesture_provider.cc",
125 "gesture_detection/gesture_provider.h", 169 "gesture_detection/gesture_provider.h",
170 "gesture_detection/gesture_provider_config_helper.cc",
171 "gesture_detection/gesture_provider_config_helper.h",
126 "gesture_detection/gesture_touch_uma_histogram.cc", 172 "gesture_detection/gesture_touch_uma_histogram.cc",
127 "gesture_detection/gesture_touch_uma_histogram.h", 173 "gesture_detection/gesture_touch_uma_histogram.h",
128 "gesture_detection/motion_event.cc", 174 "gesture_detection/motion_event.cc",
129 "gesture_detection/motion_event.h", 175 "gesture_detection/motion_event.h",
130 "gesture_detection/motion_event_buffer.cc", 176 "gesture_detection/motion_event_buffer.cc",
131 "gesture_detection/motion_event_buffer.h", 177 "gesture_detection/motion_event_buffer.h",
132 "gesture_detection/motion_event_generic.cc", 178 "gesture_detection/motion_event_generic.cc",
133 "gesture_detection/motion_event_generic.h", 179 "gesture_detection/motion_event_generic.h",
134 "gesture_detection/scale_gesture_detector.cc", 180 "gesture_detection/scale_gesture_detector.cc",
135 "gesture_detection/scale_gesture_detector.h", 181 "gesture_detection/scale_gesture_detector.h",
136 "gesture_detection/scale_gesture_listeners.cc", 182 "gesture_detection/scale_gesture_listeners.cc",
137 "gesture_detection/scale_gesture_listeners.h", 183 "gesture_detection/scale_gesture_listeners.h",
138 "gesture_detection/snap_scroll_controller.cc", 184 "gesture_detection/snap_scroll_controller.cc",
139 "gesture_detection/snap_scroll_controller.h", 185 "gesture_detection/snap_scroll_controller.h",
140 "gesture_detection/touch_disposition_gesture_filter.cc", 186 "gesture_detection/touch_disposition_gesture_filter.cc",
141 "gesture_detection/touch_disposition_gesture_filter.h", 187 "gesture_detection/touch_disposition_gesture_filter.h",
142 "gesture_detection/velocity_tracker.cc", 188 "gesture_detection/velocity_tracker.cc",
143 "gesture_detection/velocity_tracker.h", 189 "gesture_detection/velocity_tracker.h",
144 "gesture_detection/velocity_tracker_state.cc", 190 "gesture_detection/velocity_tracker_state.cc",
145 "gesture_detection/velocity_tracker_state.h", 191 "gesture_detection/velocity_tracker_state.h",
146 ] 192 ]
147 193
148 deps = [ 194 deps = [
149 ":events_base", 195 ":events_base",
150 "//base", 196 "//base",
197 "//base/third_party/dynamic_annotations",
151 "//ui/gfx", 198 "//ui/gfx",
152 "//ui/gfx/geometry", 199 "//ui/gfx/geometry",
153 ] 200 ]
154 201
155 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ] 202 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
203
204 if (is_android) {
205 sources += [ "gesture_detection/gesture_configuration_android.cc" ]
206 } else if (use_aura) {
207 sources += [ "gesture_detection/gesture_configuration_aura.cc" ]
208 } else {
209 sources += [ "gesture_detection/gesture_configuration_default.cc" ]
210 }
156 } 211 }
157 212
158 source_set("test_support") { 213 source_set("test_support") {
159 sources = [ 214 sources = [
215 "test/event_generator.cc",
216 "test/event_generator.h",
160 "test/events_test_utils.cc", 217 "test/events_test_utils.cc",
161 "test/events_test_utils.h", 218 "test/events_test_utils.h",
162 "test/mock_motion_event.cc", 219 "test/motion_event_test_utils.cc",
163 "test/mock_motion_event.h", 220 "test/motion_event_test_utils.h",
164 "test/platform_event_waiter.cc", 221 "test/platform_event_waiter.cc",
165 "test/platform_event_waiter.h", 222 "test/platform_event_waiter.h",
166 "test/test_event_handler.cc", 223 "test/test_event_handler.cc",
167 "test/test_event_handler.h", 224 "test/test_event_handler.h",
168 "test/test_event_processor.cc", 225 "test/test_event_processor.cc",
169 "test/test_event_processor.h", 226 "test/test_event_processor.h",
170 "test/test_event_target.cc", 227 "test/test_event_target.cc",
171 "test/test_event_target.h", 228 "test/test_event_target.h",
229 "test/test_event_targeter.cc",
230 "test/test_event_targeter.h",
172 ] 231 ]
173 232
174 public_deps = [ 233 public_deps = [
175 ":events", 234 ":events",
176 ":events_base", 235 ":events_base",
177 ":gesture_detection", 236 ":gesture_detection",
178 ] 237 ]
179 deps = [ 238 deps = [
180 "//base", 239 "//base",
181 "//skia", 240 "//skia",
182 "//ui/events/platform", 241 "//ui/events/platform",
183 "//ui/gfx/geometry", 242 "//ui/gfx/geometry",
184 ] 243 ]
185 244
186 if (use_x11) { 245 if (use_x11) {
187 sources += [ 246 sources += [
188 "test/events_test_utils_x11.cc", 247 "test/events_test_utils_x11.cc",
189 "test/events_test_utils_x11.h", 248 "test/events_test_utils_x11.h",
190 ] 249 ]
191 deps += [ "//ui/gfx/x" ] 250 deps += [
251 "//ui/events/devices",
252 "//ui/gfx/x",
253 ]
192 } 254 }
193 } 255 }
194 256
195 test("events_unittests") { 257 test("events_unittests") {
196 sources = [ 258 sources = [
259 "cocoa/events_mac_unittest.mm",
260 "devices/x11/device_data_manager_x11_unittest.cc",
197 "event_dispatcher_unittest.cc", 261 "event_dispatcher_unittest.cc",
198 "event_processor_unittest.cc", 262 "event_processor_unittest.cc",
199 "event_rewriter_unittest.cc", 263 "event_rewriter_unittest.cc",
200 "event_unittest.cc", 264 "event_unittest.cc",
201 "gesture_detection/bitset_32_unittest.cc", 265 "gesture_detection/bitset_32_unittest.cc",
266 "gesture_detection/filtered_gesture_provider_unittest.cc",
202 "gesture_detection/gesture_event_data_packet_unittest.cc", 267 "gesture_detection/gesture_event_data_packet_unittest.cc",
203 "gesture_detection/gesture_provider_unittest.cc", 268 "gesture_detection/gesture_provider_unittest.cc",
204 "gesture_detection/motion_event_buffer_unittest.cc", 269 "gesture_detection/motion_event_buffer_unittest.cc",
205 "gesture_detection/motion_event_generic_unittest.cc", 270 "gesture_detection/motion_event_generic_unittest.cc",
271 "gesture_detection/snap_scroll_controller_unittest.cc",
206 "gesture_detection/touch_disposition_gesture_filter_unittest.cc", 272 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
207 "gesture_detection/velocity_tracker_unittest.cc", 273 "gesture_detection/velocity_tracker_unittest.cc",
208 "gestures/fling_curve_unittest.cc", 274 "gestures/fling_curve_unittest.cc",
209 "gestures/gesture_provider_impl_unittest.cc", 275 "gestures/gesture_provider_impl_unittest.cc",
210 "keycodes/dom4/keycode_converter_unittest.cc", 276 "keycodes/dom/keycode_converter_unittest.cc",
277 "keycodes/keyboard_code_conversion_unittest.cc",
211 "latency_info_unittest.cc", 278 "latency_info_unittest.cc",
212 "platform/platform_event_builder_x_unittest.cc",
213 "platform/platform_event_source_unittest.cc", 279 "platform/platform_event_source_unittest.cc",
214 "platform/x11/platform_event_utils_x_unittest.cc", 280 "x/events_x_unittest.cc",
215 ] 281 ]
216 282
217 deps = [ 283 deps = [
218 ":dom4_keycode_converter", 284 ":dom_keycode_converter",
219 ":events", 285 ":events",
220 ":events_base", 286 ":events_base",
221 ":gesture_detection", 287 ":gesture_detection",
222 ":test_support", 288 ":test_support",
223 "//base", 289 "//base",
224 "//base/test:run_all_unittests", 290 "//base/test:run_all_unittests",
225 "//skia", 291 "//skia",
226 "//testing/gtest", 292 "//testing/gtest",
293 "//ui/events/devices",
227 "//ui/events/platform", 294 "//ui/events/platform",
228 "//ui/gfx:test_support", 295 "//ui/gfx:test_support",
229 ] 296 ]
230 297
298 include_dirs = [ "//testing/gmock/include" ]
299
231 if (use_x11) { 300 if (use_x11) {
232 configs += [ "//build/config/linux:x11" ] 301 configs += [ "//build/config/linux:x11" ]
233 deps += [ "//ui/gfx/x" ] 302 deps += [ "//ui/gfx/x" ]
234 } else { 303 } else {
235 sources -= [ 304 sources -= [
236 "platform/platform_event_builder_x_unittest.cc", 305 "devices/x11/device_data_manager_x11_unittest.cc",
237 "platform/x11/platform_event_utils_x_unittest.cc", 306 "x/events_x_unittest.cc",
307 ]
308 }
309
310 if (use_ozone) {
311 sources += [
312 "ozone/chromeos/cursor_controller_unittest.cc",
313 "ozone/evdev/event_converter_evdev_impl_unittest.cc",
314 "ozone/evdev/event_converter_test_util.cc",
315 "ozone/evdev/event_device_info_unittest.cc",
316 "ozone/evdev/event_device_test_util.cc",
317 "ozone/evdev/input_injector_evdev_unittest.cc",
318 "ozone/evdev/tablet_event_converter_evdev_unittest.cc",
319 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
320 "ozone/evdev/touch_noise/touch_noise_finder_unittest.cc",
321 "ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc",
322 ]
323 deps += [
324 "//ui/events/ozone:events_ozone",
325 "//ui/events/ozone:events_ozone_evdev",
326 "//ui/events/ozone:events_ozone_layout",
238 ] 327 ]
239 } 328 }
240 } 329 }
330
331 if (is_nacl) {
332 source_set("latency_info") {
333 sources = [
334 "ipc/latency_info_param_traits.cc",
335 "ipc/latency_info_param_traits.h",
336 "latency_info.cc",
337 "latency_info.h",
338 ]
339 }
340 }
OLDNEW
« no previous file with comments | « services/window_manager/view_targeter_unittest.cc ('k') | ui/events/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698