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/keyboard_code_conversion.cc",
37 "keycodes/keyboard_code_conversion.h",
38 "keycodes/keyboard_code_conversion_android.cc",
39 "keycodes/keyboard_code_conversion_android.h",
40 "keycodes/keyboard_code_conversion_mac.h",
41 "keycodes/keyboard_code_conversion_mac.mm",
42 "keycodes/keyboard_code_conversion_win.cc",
43 "keycodes/keyboard_code_conversion_win.h",
44 "keycodes/keyboard_codes.h",
49 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
52 ":dom4_keycode_converter",
53 "//base/third_party/dynamic_annotations",
59 "//ui/events/platform",
65 configs += [ "//build/config/linux:x11" ]
68 "keycodes/keyboard_code_conversion_x.cc",
69 "keycodes/keyboard_code_conversion_x.h",
70 "x/keysym_to_unicode.cc",
71 "x/keysym_to_unicode.h",
74 deps += [ "//ui/gfx/x" ]
80 "cocoa/cocoa_event_utils.h",
81 "cocoa/cocoa_event_utils.mm",
82 "cocoa/events_mac.mm",
85 "event_dispatcher.cc",
96 "event_target_iterator.h",
103 "gestures/gesture_recognizer_impl_mac.cc",
104 "gestures/gesture_types.h",
105 "null_event_targeter.cc",
106 "null_event_targeter.h",
110 defines = [ "EVENTS_IMPLEMENTATION" ]
116 ":dom4_keycode_converter",
117 ":gesture_detection",
118 "//base/third_party/dynamic_annotations",
125 sources += [ "x/events_x.cc" ]
127 "//build/config/linux:glib",
128 "//build/config/linux:x11",
131 "//ui/events/devices",
136 if (!is_chromeos && is_linux) {
138 "linux/text_edit_command_auralinux.cc",
139 "linux/text_edit_command_auralinux.h",
140 "linux/text_edit_key_bindings_delegate_auralinux.cc",
141 "linux/text_edit_key_bindings_delegate_auralinux.h",
146 sources += [ "ozone/events_ozone.cc" ]
147 deps += [ "//ui/events/ozone:events_ozone_layout" ]
152 "gestures/gesture_provider_aura.cc",
153 "gestures/gesture_provider_aura.h",
154 "gestures/gesture_recognizer.h",
155 "gestures/gesture_recognizer_impl.cc",
156 "gestures/gesture_recognizer_impl.h",
157 "gestures/motion_event_aura.cc",
158 "gestures/motion_event_aura.h",
162 if (is_win || is_mac || use_x11 || use_ozone) {
163 sources -= [ "events_stub.cc" ]
167 component("gesture_detection") {
169 "gesture_detection/bitset_32.h",
170 "gesture_detection/filtered_gesture_provider.cc",
171 "gesture_detection/filtered_gesture_provider.h",
172 "gesture_detection/gesture_configuration.cc",
173 "gesture_detection/gesture_configuration.h",
174 "gesture_detection/gesture_detection_export.h",
175 "gesture_detection/gesture_detector.cc",
176 "gesture_detection/gesture_detector.h",
177 "gesture_detection/gesture_event_data.cc",
178 "gesture_detection/gesture_event_data.h",
179 "gesture_detection/gesture_event_data_packet.cc",
180 "gesture_detection/gesture_event_data_packet.h",
181 "gesture_detection/gesture_listeners.cc",
182 "gesture_detection/gesture_listeners.h",
183 "gesture_detection/gesture_provider.cc",
184 "gesture_detection/gesture_provider.h",
185 "gesture_detection/gesture_provider_config_helper.cc",
186 "gesture_detection/gesture_provider_config_helper.h",
187 "gesture_detection/gesture_touch_uma_histogram.cc",
188 "gesture_detection/gesture_touch_uma_histogram.h",
189 "gesture_detection/motion_event.cc",
190 "gesture_detection/motion_event.h",
191 "gesture_detection/motion_event_buffer.cc",
192 "gesture_detection/motion_event_buffer.h",
193 "gesture_detection/motion_event_generic.cc",
194 "gesture_detection/motion_event_generic.h",
195 "gesture_detection/scale_gesture_detector.cc",
196 "gesture_detection/scale_gesture_detector.h",
197 "gesture_detection/scale_gesture_listeners.cc",
198 "gesture_detection/scale_gesture_listeners.h",
199 "gesture_detection/snap_scroll_controller.cc",
200 "gesture_detection/snap_scroll_controller.h",
201 "gesture_detection/touch_disposition_gesture_filter.cc",
202 "gesture_detection/touch_disposition_gesture_filter.h",
203 "gesture_detection/velocity_tracker.cc",
204 "gesture_detection/velocity_tracker.h",
205 "gesture_detection/velocity_tracker_state.cc",
206 "gesture_detection/velocity_tracker_state.h",
212 "//base/third_party/dynamic_annotations",
217 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
220 sources += [ "gesture_detection/gesture_configuration_android.cc" ]
221 } else if (use_aura) {
222 sources += [ "gesture_detection/gesture_configuration_aura.cc" ]
224 sources += [ "gesture_detection/gesture_configuration_default.cc" ]
228 source_set("test_support") {
230 "test/cocoa_test_event_utils.h",
231 "test/cocoa_test_event_utils.mm",
232 "test/event_generator.cc",
233 "test/event_generator.h",
234 "test/events_test_utils.cc",
235 "test/events_test_utils.h",
236 "test/motion_event_test_utils.cc",
237 "test/motion_event_test_utils.h",
238 "test/platform_event_waiter.cc",
239 "test/platform_event_waiter.h",
240 "test/test_event_handler.cc",
241 "test/test_event_handler.h",
242 "test/test_event_processor.cc",
243 "test/test_event_processor.h",
244 "test/test_event_target.cc",
245 "test/test_event_target.h",
251 ":gesture_detection",
256 "//ui/events/platform",
262 "test/cocoa_test_event_utils.h",
263 "test/cocoa_test_event_utils.mm",
269 "test/events_test_utils_x11.cc",
270 "test/events_test_utils_x11.h",
273 "//ui/events/devices",
279 test("events_unittests") {
281 "android/scroller_unittest.cc",
282 "cocoa/events_mac_unittest.mm",
283 "devices/x11/device_data_manager_x11_unittest.cc",
284 "event_dispatcher_unittest.cc",
285 "event_processor_unittest.cc",
286 "event_rewriter_unittest.cc",
288 "gesture_detection/bitset_32_unittest.cc",
289 "gesture_detection/filtered_gesture_provider_unittest.cc",
290 "gesture_detection/gesture_event_data_packet_unittest.cc",
291 "gesture_detection/gesture_provider_unittest.cc",
292 "gesture_detection/motion_event_buffer_unittest.cc",
293 "gesture_detection/motion_event_generic_unittest.cc",
294 "gesture_detection/snap_scroll_controller_unittest.cc",
295 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
296 "gesture_detection/velocity_tracker_unittest.cc",
297 "gestures/fling_curve_unittest.cc",
298 "keycodes/dom4/keycode_converter_unittest.cc",
299 "latency_info_unittest.cc",
300 "platform/platform_event_source_unittest.cc",
301 "x/events_x_unittest.cc",
305 ":dom4_keycode_converter",
308 ":gesture_detection",
311 "//base/test:run_all_unittests",
314 "//ui/events/devices",
315 "//ui/events/platform",
316 "//ui/gfx:test_support",
319 include_dirs = [ "//testing/gmock/include" ]
322 configs += [ "//build/config/linux:x11" ]
323 deps += [ "//ui/gfx/x" ]
326 "devices/x11/device_data_manager_x11_unittest.cc",
327 "x/events_x_unittest.cc",
333 "ozone/chromeos/cursor_controller_unittest.cc",
334 "ozone/evdev/event_converter_evdev_impl_unittest.cc",
335 "ozone/evdev/event_converter_test_util.cc",
336 "ozone/evdev/event_device_info_unittest.cc",
337 "ozone/evdev/event_device_test_util.cc",
338 "ozone/evdev/input_injector_evdev_unittest.cc",
339 "ozone/evdev/tablet_event_converter_evdev_unittest.cc",
340 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
341 "ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc",
344 "//ui/events/ozone:events_ozone",
345 "//ui/events/ozone:events_ozone_evdev",
346 "//ui/events/ozone:events_ozone_layout",
351 sources += [ "gestures/gesture_provider_aura_unittest.cc" ]
356 source_set("latency_info") {
358 "ipc/latency_info_param_traits.cc",
359 "ipc/latency_info_param_traits.h",