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")
7 static_library("dom4_keycode_converter") {
9 "keycodes/dom4/keycode_converter.cc",
10 "keycodes/dom4/keycode_converter.h",
11 "keycodes/dom4/keycode_converter_data.h",
17 component("events_base") {
19 "android/scroller.cc",
21 "device_data_manager.cc",
22 "device_data_manager.h",
23 "device_hotplug_event_observer.h",
27 "events_base_export.h",
29 "gesture_event_details.cc",
30 "gesture_event_details.h",
31 "gestures/fling_curve.cc",
32 "gestures/fling_curve.h",
33 "gestures/gesture_configuration.cc",
34 "gestures/gesture_configuration.h",
39 "keycodes/keyboard_code_conversion.cc",
40 "keycodes/keyboard_code_conversion.h",
41 "keycodes/keyboard_code_conversion_android.cc",
42 "keycodes/keyboard_code_conversion_android.h",
43 "keycodes/keyboard_code_conversion_mac.h",
44 "keycodes/keyboard_code_conversion_mac.mm",
45 "keycodes/keyboard_code_conversion_win.cc",
46 "keycodes/keyboard_code_conversion_win.h",
47 "keycodes/keyboard_codes.h",
50 "touchscreen_device.cc",
51 "touchscreen_device.h",
54 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
57 ":dom4_keycode_converter",
58 "//base/third_party/dynamic_annotations",
64 "//ui/events/platform",
70 configs += [ "//build/config/linux:x11" ]
73 "keycodes/keyboard_code_conversion_x.cc",
74 "keycodes/keyboard_code_conversion_x.h",
75 "x/device_data_manager_x11.cc",
76 "x/device_data_manager_x11.h",
77 "x/device_list_cache_x.cc",
78 "x/device_list_cache_x.h",
79 "x/hotplug_event_handler_x11.cc",
80 "x/hotplug_event_handler_x11.h",
81 "x/keysym_to_unicode.cc",
82 "x/keysym_to_unicode.h",
83 "x/touch_factory_x11.cc",
84 "x/touch_factory_x11.h",
87 deps += [ "//ui/gfx/x" ]
93 "cocoa/cocoa_event_utils.h",
94 "cocoa/cocoa_event_utils.mm",
95 "cocoa/events_mac.mm",
98 "event_dispatcher.cc",
102 "event_processor.cc",
109 "event_target_iterator.h",
116 "gestures/gesture_recognizer_impl_mac.cc",
117 "gestures/gesture_types.h",
121 defines = [ "EVENTS_IMPLEMENTATION" ]
127 ":dom4_keycode_converter",
128 ":gesture_detection",
129 "//base/third_party/dynamic_annotations",
136 sources += [ "x/events_x.cc" ]
138 "//build/config/linux:glib",
139 "//build/config/linux:x11",
141 deps += [ "//ui/gfx/x" ]
144 if (!is_chromeos && is_linux) {
146 "linux/text_edit_command_auralinux.cc",
147 "linux/text_edit_command_auralinux.h",
148 "linux/text_edit_key_bindings_delegate_auralinux.cc",
149 "linux/text_edit_key_bindings_delegate_auralinux.h",
155 "ozone/events_ozone.cc",
161 "gestures/gesture_provider_aura.cc",
162 "gestures/gesture_provider_aura.h",
163 "gestures/motion_event_aura.cc",
164 "gestures/motion_event_aura.h",
165 "gestures/gesture_recognizer.h",
166 "gestures/gesture_recognizer_impl.cc",
167 "gestures/gesture_recognizer_impl.h",
171 if (is_win || is_mac || use_x11 || use_ozone) {
172 sources -= [ "events_stub.cc" ]
176 component("gesture_detection") {
178 "gesture_detection/bitset_32.h",
179 "gesture_detection/filtered_gesture_provider.cc",
180 "gesture_detection/filtered_gesture_provider.h",
181 "gesture_detection/gesture_config_helper.h",
182 "gesture_detection/gesture_detection_export.h",
183 "gesture_detection/gesture_detector.cc",
184 "gesture_detection/gesture_detector.h",
185 "gesture_detection/gesture_event_data.cc",
186 "gesture_detection/gesture_event_data.h",
187 "gesture_detection/gesture_event_data_packet.cc",
188 "gesture_detection/gesture_event_data_packet.h",
189 "gesture_detection/gesture_listeners.cc",
190 "gesture_detection/gesture_listeners.h",
191 "gesture_detection/gesture_provider.cc",
192 "gesture_detection/gesture_provider.h",
193 "gesture_detection/gesture_touch_uma_histogram.cc",
194 "gesture_detection/gesture_touch_uma_histogram.h",
195 "gesture_detection/motion_event.cc",
196 "gesture_detection/motion_event.h",
197 "gesture_detection/motion_event_buffer.cc",
198 "gesture_detection/motion_event_buffer.h",
199 "gesture_detection/motion_event_generic.cc",
200 "gesture_detection/motion_event_generic.h",
201 "gesture_detection/scale_gesture_detector.cc",
202 "gesture_detection/scale_gesture_detector.h",
203 "gesture_detection/scale_gesture_listeners.cc",
204 "gesture_detection/scale_gesture_listeners.h",
205 "gesture_detection/snap_scroll_controller.cc",
206 "gesture_detection/snap_scroll_controller.h",
207 "gesture_detection/touch_disposition_gesture_filter.cc",
208 "gesture_detection/touch_disposition_gesture_filter.h",
209 "gesture_detection/velocity_tracker_state.cc",
210 "gesture_detection/velocity_tracker_state.h",
211 "gesture_detection/velocity_tracker.cc",
212 "gesture_detection/velocity_tracker.h",
222 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
225 sources += [ "gesture_detection/gesture_config_helper_android.cc" ]
226 } else if (use_aura) {
227 sources += [ "gesture_detection/gesture_config_helper_aura.cc" ]
229 sources += [ "gesture_detection/gesture_config_helper.cc" ]
233 source_set("test_support") {
235 "test/cocoa_test_event_utils.h",
236 "test/cocoa_test_event_utils.mm",
237 "test/event_generator.cc",
238 "test/event_generator.h",
239 "test/events_test_utils.cc",
240 "test/events_test_utils.h",
241 "test/motion_event_test_utils.cc",
242 "test/motion_event_test_utils.h",
243 "test/platform_event_waiter.cc",
244 "test/platform_event_waiter.h",
245 "test/test_event_handler.cc",
246 "test/test_event_handler.h",
247 "test/test_event_processor.cc",
248 "test/test_event_processor.h",
249 "test/test_event_target.cc",
250 "test/test_event_target.h",
256 ":gesture_detection",
261 "//ui/events/platform",
267 "test/cocoa_test_event_utils.h",
268 "test/cocoa_test_event_utils.mm",
274 "test/events_test_utils_x11.cc",
275 "test/events_test_utils_x11.h",
277 deps += [ "//ui/gfx/x" ]
281 test("events_unittests") {
283 "android/scroller_unittest.cc",
284 "cocoa/events_mac_unittest.mm",
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/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/touch_disposition_gesture_filter_unittest.cc",
295 "gesture_detection/velocity_tracker_unittest.cc",
296 "gestures/fling_curve_unittest.cc",
297 "keycodes/dom4/keycode_converter_unittest.cc",
298 "latency_info_unittest.cc",
299 "platform/platform_event_source_unittest.cc",
300 "x/device_data_manager_x11_unittest.cc",
301 "x/events_x_unittest.cc",
305 ":dom4_keycode_converter",
308 ":gesture_detection",
311 "//base/test:run_all_unittests",
314 "//ui/events/platform",
315 "//ui/gfx:test_support",
319 configs += [ "//build/config/linux:x11" ]
320 deps += [ "//ui/gfx/x" ]
323 "x/device_data_manager_x11_unittest.cc",
324 "x/events_x_unittest.cc",
330 "ozone/evdev/key_event_converter_evdev_unittest.cc",
331 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
337 "gestures/gesture_provider_aura_unittest.cc",