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/dom3/dom_code.h",
10 "keycodes/dom3/dom_key.h",
11 "keycodes/dom3/dom_key_data.h",
12 "keycodes/dom4/keycode_converter.cc",
13 "keycodes/dom4/keycode_converter.h",
14 "keycodes/dom4/keycode_converter_data.h",
22 component("events_base") {
24 "android/scroller.cc",
29 "events_base_export.h",
31 "gesture_event_details.cc",
32 "gesture_event_details.h",
33 "gestures/fling_curve.cc",
34 "gestures/fling_curve.h",
35 "keycodes/keyboard_code_conversion.cc",
36 "keycodes/keyboard_code_conversion.h",
37 "keycodes/keyboard_code_conversion_android.cc",
38 "keycodes/keyboard_code_conversion_android.h",
39 "keycodes/keyboard_code_conversion_mac.h",
40 "keycodes/keyboard_code_conversion_mac.mm",
41 "keycodes/keyboard_code_conversion_win.cc",
42 "keycodes/keyboard_code_conversion_win.h",
43 "keycodes/keyboard_codes.h",
48 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
51 ":dom4_keycode_converter",
52 "//base/third_party/dynamic_annotations",
58 "//ui/events/platform",
64 configs += [ "//build/config/linux:x11" ]
67 "keycodes/keyboard_code_conversion_x.cc",
68 "keycodes/keyboard_code_conversion_x.h",
69 "x/keysym_to_unicode.cc",
70 "x/keysym_to_unicode.h",
73 deps += [ "//ui/gfx/x" ]
79 "cocoa/cocoa_event_utils.h",
80 "cocoa/cocoa_event_utils.mm",
81 "cocoa/events_mac.mm",
84 "event_dispatcher.cc",
95 "event_target_iterator.h",
102 "gestures/gesture_recognizer_impl_mac.cc",
103 "gestures/gesture_types.h",
107 defines = [ "EVENTS_IMPLEMENTATION" ]
113 ":dom4_keycode_converter",
114 ":gesture_detection",
115 "//base/third_party/dynamic_annotations",
122 sources += [ "x/events_x.cc" ]
124 "//build/config/linux:glib",
125 "//build/config/linux:x11",
128 "//ui/events/devices",
133 if (!is_chromeos && is_linux) {
135 "linux/text_edit_command_auralinux.cc",
136 "linux/text_edit_command_auralinux.h",
137 "linux/text_edit_key_bindings_delegate_auralinux.cc",
138 "linux/text_edit_key_bindings_delegate_auralinux.h",
143 sources += [ "ozone/events_ozone.cc" ]
144 deps += [ "//ui/events/ozone:events_ozone_layout" ]
149 "gestures/gesture_provider_aura.cc",
150 "gestures/gesture_provider_aura.h",
151 "gestures/motion_event_aura.cc",
152 "gestures/motion_event_aura.h",
153 "gestures/gesture_recognizer.h",
154 "gestures/gesture_recognizer_impl.cc",
155 "gestures/gesture_recognizer_impl.h",
159 if (is_win || is_mac || use_x11 || use_ozone) {
160 sources -= [ "events_stub.cc" ]
164 component("gesture_detection") {
166 "gesture_detection/bitset_32.h",
167 "gesture_detection/filtered_gesture_provider.cc",
168 "gesture_detection/filtered_gesture_provider.h",
169 "gesture_detection/gesture_configuration.cc",
170 "gesture_detection/gesture_configuration.h",
171 "gesture_detection/gesture_detection_export.h",
172 "gesture_detection/gesture_detector.cc",
173 "gesture_detection/gesture_detector.h",
174 "gesture_detection/gesture_event_data.cc",
175 "gesture_detection/gesture_event_data.h",
176 "gesture_detection/gesture_event_data_packet.cc",
177 "gesture_detection/gesture_event_data_packet.h",
178 "gesture_detection/gesture_listeners.cc",
179 "gesture_detection/gesture_listeners.h",
180 "gesture_detection/gesture_provider.cc",
181 "gesture_detection/gesture_provider.h",
182 "gesture_detection/gesture_provider_config_helper.cc",
183 "gesture_detection/gesture_provider_config_helper.h",
184 "gesture_detection/gesture_touch_uma_histogram.cc",
185 "gesture_detection/gesture_touch_uma_histogram.h",
186 "gesture_detection/motion_event.cc",
187 "gesture_detection/motion_event.h",
188 "gesture_detection/motion_event_buffer.cc",
189 "gesture_detection/motion_event_buffer.h",
190 "gesture_detection/motion_event_generic.cc",
191 "gesture_detection/motion_event_generic.h",
192 "gesture_detection/scale_gesture_detector.cc",
193 "gesture_detection/scale_gesture_detector.h",
194 "gesture_detection/scale_gesture_listeners.cc",
195 "gesture_detection/scale_gesture_listeners.h",
196 "gesture_detection/snap_scroll_controller.cc",
197 "gesture_detection/snap_scroll_controller.h",
198 "gesture_detection/touch_disposition_gesture_filter.cc",
199 "gesture_detection/touch_disposition_gesture_filter.h",
200 "gesture_detection/velocity_tracker_state.cc",
201 "gesture_detection/velocity_tracker_state.h",
202 "gesture_detection/velocity_tracker.cc",
203 "gesture_detection/velocity_tracker.h",
209 "//base/third_party/dynamic_annotations",
214 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
217 sources += [ "gesture_detection/gesture_configuration_android.cc" ]
218 } else if (use_aura) {
219 sources += [ "gesture_detection/gesture_configuration_aura.cc" ]
221 sources += [ "gesture_detection/gesture_configuration_default.cc" ]
225 source_set("test_support") {
227 "test/cocoa_test_event_utils.h",
228 "test/cocoa_test_event_utils.mm",
229 "test/event_generator.cc",
230 "test/event_generator.h",
231 "test/events_test_utils.cc",
232 "test/events_test_utils.h",
233 "test/motion_event_test_utils.cc",
234 "test/motion_event_test_utils.h",
235 "test/platform_event_waiter.cc",
236 "test/platform_event_waiter.h",
237 "test/test_event_handler.cc",
238 "test/test_event_handler.h",
239 "test/test_event_processor.cc",
240 "test/test_event_processor.h",
241 "test/test_event_target.cc",
242 "test/test_event_target.h",
248 ":gesture_detection",
253 "//ui/events/platform",
259 "test/cocoa_test_event_utils.h",
260 "test/cocoa_test_event_utils.mm",
266 "test/events_test_utils_x11.cc",
267 "test/events_test_utils_x11.h",
270 "//ui/events/devices",
276 test("events_unittests") {
278 "android/scroller_unittest.cc",
279 "cocoa/events_mac_unittest.mm",
280 "devices/x11/device_data_manager_x11_unittest.cc",
281 "event_dispatcher_unittest.cc",
282 "event_processor_unittest.cc",
283 "event_rewriter_unittest.cc",
285 "gesture_detection/bitset_32_unittest.cc",
286 "gesture_detection/filtered_gesture_provider_unittest.cc",
287 "gesture_detection/gesture_event_data_packet_unittest.cc",
288 "gesture_detection/gesture_provider_unittest.cc",
289 "gesture_detection/motion_event_buffer_unittest.cc",
290 "gesture_detection/motion_event_generic_unittest.cc",
291 "gesture_detection/snap_scroll_controller_unittest.cc",
292 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
293 "gesture_detection/velocity_tracker_unittest.cc",
294 "gestures/fling_curve_unittest.cc",
295 "keycodes/dom4/keycode_converter_unittest.cc",
296 "latency_info_unittest.cc",
297 "platform/platform_event_source_unittest.cc",
298 "x/events_x_unittest.cc",
302 ":dom4_keycode_converter",
305 ":gesture_detection",
308 "//base/test:run_all_unittests",
311 "//ui/events/devices",
312 "//ui/events/platform",
313 "//ui/gfx:test_support",
316 include_dirs = [ "//testing/gmock/include" ]
319 configs += [ "//build/config/linux:x11" ]
320 deps += [ "//ui/gfx/x" ]
323 "devices/x11/device_data_manager_x11_unittest.cc",
324 "x/events_x_unittest.cc",
330 "ozone/chromeos/cursor_controller_unittest.cc",
331 "ozone/evdev/event_converter_evdev_impl_unittest.cc",
332 "ozone/evdev/input_injector_evdev_unittest.cc",
333 "ozone/evdev/tablet_event_converter_evdev_unittest.cc",
334 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
335 "ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc",
338 "//ui/events/ozone:events_ozone",
339 "//ui/events/ozone:events_ozone_evdev",
340 "//ui/events/ozone:events_ozone_layout",
345 sources += [ "gestures/gesture_provider_aura_unittest.cc" ]