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 static_library("dom4_keycode_converter") {
10 "keycodes/dom3/dom_code.h",
11 "keycodes/dom3/dom_key.h",
12 "keycodes/dom3/dom_key_data.h",
13 "keycodes/dom4/keycode_converter.cc",
14 "keycodes/dom4/keycode_converter.h",
15 "keycodes/dom4/keycode_converter_data.h",
23 component("events_base") {
25 "android/scroller.cc",
30 "events_base_export.h",
32 "gesture_event_details.cc",
33 "gesture_event_details.h",
34 "gestures/fling_curve.cc",
35 "gestures/fling_curve.h",
36 "keycodes/dom_us_layout_data.h",
37 "keycodes/keyboard_code_conversion.cc",
38 "keycodes/keyboard_code_conversion.h",
39 "keycodes/keyboard_code_conversion_android.cc",
40 "keycodes/keyboard_code_conversion_android.h",
41 "keycodes/keyboard_code_conversion_mac.h",
42 "keycodes/keyboard_code_conversion_mac.mm",
43 "keycodes/keyboard_code_conversion_win.cc",
44 "keycodes/keyboard_code_conversion_win.h",
45 "keycodes/keyboard_codes.h",
50 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
53 ":dom4_keycode_converter",
54 "//base/third_party/dynamic_annotations",
60 "//ui/events/platform",
66 configs += [ "//build/config/linux:x11" ]
69 "keycodes/keyboard_code_conversion_x.cc",
70 "keycodes/keyboard_code_conversion_x.h",
71 "x/keysym_to_unicode.cc",
72 "x/keysym_to_unicode.h",
75 deps += [ "//ui/gfx/x" ]
81 "cocoa/cocoa_event_utils.h",
82 "cocoa/cocoa_event_utils.mm",
83 "cocoa/events_mac.mm",
86 "event_dispatcher.cc",
97 "event_target_iterator.h",
104 "gestures/gesture_recognizer_impl_mac.cc",
105 "gestures/gesture_types.h",
106 "null_event_targeter.cc",
107 "null_event_targeter.h",
111 defines = [ "EVENTS_IMPLEMENTATION" ]
117 ":dom4_keycode_converter",
118 ":gesture_detection",
119 "//base/third_party/dynamic_annotations",
126 sources += [ "x/events_x.cc" ]
128 "//build/config/linux:glib",
129 "//build/config/linux:x11",
132 "//ui/events/devices",
137 if (!is_chromeos && is_linux) {
139 "linux/text_edit_command_auralinux.cc",
140 "linux/text_edit_command_auralinux.h",
141 "linux/text_edit_key_bindings_delegate_auralinux.cc",
142 "linux/text_edit_key_bindings_delegate_auralinux.h",
147 sources += [ "ozone/events_ozone.cc" ]
148 deps += [ "//ui/events/ozone:events_ozone_layout" ]
153 "gestures/gesture_provider_aura.cc",
154 "gestures/gesture_provider_aura.h",
155 "gestures/gesture_recognizer.h",
156 "gestures/gesture_recognizer_impl.cc",
157 "gestures/gesture_recognizer_impl.h",
158 "gestures/motion_event_aura.cc",
159 "gestures/motion_event_aura.h",
163 if (is_win || is_mac || use_x11 || use_ozone) {
164 sources -= [ "events_stub.cc" ]
168 component("gesture_detection") {
170 "gesture_detection/bitset_32.h",
171 "gesture_detection/filtered_gesture_provider.cc",
172 "gesture_detection/filtered_gesture_provider.h",
173 "gesture_detection/gesture_configuration.cc",
174 "gesture_detection/gesture_configuration.h",
175 "gesture_detection/gesture_detection_export.h",
176 "gesture_detection/gesture_detector.cc",
177 "gesture_detection/gesture_detector.h",
178 "gesture_detection/gesture_event_data.cc",
179 "gesture_detection/gesture_event_data.h",
180 "gesture_detection/gesture_event_data_packet.cc",
181 "gesture_detection/gesture_event_data_packet.h",
182 "gesture_detection/gesture_listeners.cc",
183 "gesture_detection/gesture_listeners.h",
184 "gesture_detection/gesture_provider.cc",
185 "gesture_detection/gesture_provider.h",
186 "gesture_detection/gesture_provider_config_helper.cc",
187 "gesture_detection/gesture_provider_config_helper.h",
188 "gesture_detection/gesture_touch_uma_histogram.cc",
189 "gesture_detection/gesture_touch_uma_histogram.h",
190 "gesture_detection/motion_event.cc",
191 "gesture_detection/motion_event.h",
192 "gesture_detection/motion_event_buffer.cc",
193 "gesture_detection/motion_event_buffer.h",
194 "gesture_detection/motion_event_generic.cc",
195 "gesture_detection/motion_event_generic.h",
196 "gesture_detection/scale_gesture_detector.cc",
197 "gesture_detection/scale_gesture_detector.h",
198 "gesture_detection/scale_gesture_listeners.cc",
199 "gesture_detection/scale_gesture_listeners.h",
200 "gesture_detection/snap_scroll_controller.cc",
201 "gesture_detection/snap_scroll_controller.h",
202 "gesture_detection/touch_disposition_gesture_filter.cc",
203 "gesture_detection/touch_disposition_gesture_filter.h",
204 "gesture_detection/velocity_tracker.cc",
205 "gesture_detection/velocity_tracker.h",
206 "gesture_detection/velocity_tracker_state.cc",
207 "gesture_detection/velocity_tracker_state.h",
213 "//base/third_party/dynamic_annotations",
218 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
221 sources += [ "gesture_detection/gesture_configuration_android.cc" ]
222 } else if (use_aura) {
223 sources += [ "gesture_detection/gesture_configuration_aura.cc" ]
225 sources += [ "gesture_detection/gesture_configuration_default.cc" ]
229 source_set("test_support") {
231 "test/cocoa_test_event_utils.h",
232 "test/cocoa_test_event_utils.mm",
233 "test/event_generator.cc",
234 "test/event_generator.h",
235 "test/events_test_utils.cc",
236 "test/events_test_utils.h",
237 "test/motion_event_test_utils.cc",
238 "test/motion_event_test_utils.h",
239 "test/platform_event_waiter.cc",
240 "test/platform_event_waiter.h",
241 "test/test_event_handler.cc",
242 "test/test_event_handler.h",
243 "test/test_event_processor.cc",
244 "test/test_event_processor.h",
245 "test/test_event_target.cc",
246 "test/test_event_target.h",
252 ":gesture_detection",
257 "//ui/events/platform",
263 "test/cocoa_test_event_utils.h",
264 "test/cocoa_test_event_utils.mm",
270 "test/events_test_utils_x11.cc",
271 "test/events_test_utils_x11.h",
274 "//ui/events/devices",
280 test("events_unittests") {
282 "android/scroller_unittest.cc",
283 "cocoa/events_mac_unittest.mm",
284 "devices/x11/device_data_manager_x11_unittest.cc",
285 "event_dispatcher_unittest.cc",
286 "event_processor_unittest.cc",
287 "event_rewriter_unittest.cc",
289 "gesture_detection/bitset_32_unittest.cc",
290 "gesture_detection/filtered_gesture_provider_unittest.cc",
291 "gesture_detection/gesture_event_data_packet_unittest.cc",
292 "gesture_detection/gesture_provider_unittest.cc",
293 "gesture_detection/motion_event_buffer_unittest.cc",
294 "gesture_detection/motion_event_generic_unittest.cc",
295 "gesture_detection/snap_scroll_controller_unittest.cc",
296 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
297 "gesture_detection/velocity_tracker_unittest.cc",
298 "gestures/blink/web_gesture_curve_impl_unittest.cc",
299 "gestures/fling_curve_unittest.cc",
300 "keycodes/dom4/keycode_converter_unittest.cc",
301 "keycodes/keyboard_code_conversion_unittest.cc",
302 "latency_info_unittest.cc",
303 "platform/platform_event_source_unittest.cc",
304 "x/events_x_unittest.cc",
308 ":dom4_keycode_converter",
311 ":gesture_detection",
314 "//base/test:run_all_unittests",
317 "//third_party/WebKit/public:blink_headers",
318 "//ui/events/devices",
319 "//ui/events/gestures/blink",
320 "//ui/events/platform",
321 "//ui/gfx:test_support",
324 include_dirs = [ "//testing/gmock/include" ]
327 configs += [ "//build/config/linux:x11" ]
328 deps += [ "//ui/gfx/x" ]
331 "devices/x11/device_data_manager_x11_unittest.cc",
332 "x/events_x_unittest.cc",
338 "ozone/chromeos/cursor_controller_unittest.cc",
339 "ozone/evdev/event_converter_evdev_impl_unittest.cc",
340 "ozone/evdev/event_converter_test_util.cc",
341 "ozone/evdev/event_device_info_unittest.cc",
342 "ozone/evdev/event_device_test_util.cc",
343 "ozone/evdev/input_injector_evdev_unittest.cc",
344 "ozone/evdev/tablet_event_converter_evdev_unittest.cc",
345 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
346 "ozone/evdev/touch_noise/touch_noise_finder_unittest.cc",
347 "ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc",
350 "//ui/events/ozone:events_ozone",
351 "//ui/events/ozone:events_ozone_evdev",
352 "//ui/events/ozone:events_ozone_layout",
357 sources += [ "gestures/gesture_provider_aura_unittest.cc" ]
362 source_set("latency_info") {
364 "ipc/latency_info_param_traits.cc",
365 "ipc/latency_info_param_traits.h",