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") {
22 "events_base_export.h",
23 "gesture_event_details.cc",
24 "gesture_event_details.h",
25 "gestures/gesture_configuration.cc",
26 "gestures/gesture_configuration.h",
27 "keycodes/keyboard_code_conversion.cc",
28 "keycodes/keyboard_code_conversion.h",
29 "keycodes/keyboard_code_conversion_android.cc",
30 "keycodes/keyboard_code_conversion_android.h",
31 "keycodes/keyboard_code_conversion_mac.h",
32 "keycodes/keyboard_code_conversion_mac.mm",
33 "keycodes/keyboard_code_conversion_win.cc",
34 "keycodes/keyboard_code_conversion_win.h",
35 "keycodes/keyboard_codes.h",
40 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
43 ":dom4_keycode_converter",
45 "//base/third_party/dynamic_annotations",
47 "//ui/events/platform",
53 configs += [ "//build/config/linux:x11" ]
56 "keycodes/keyboard_code_conversion_x.cc",
57 "keycodes/keyboard_code_conversion_x.h",
58 "x/device_data_manager.cc",
59 "x/device_data_manager.h",
60 "x/device_list_cache_x.cc",
61 "x/device_list_cache_x.h",
62 "x/touch_factory_x11.cc",
63 "x/touch_factory_x11.h",
70 ":dom4_keycode_converter",
78 defines = [ "EVENTS_IMPLEMENTATION" ]
81 "cocoa/cocoa_event_utils.h",
82 "cocoa/cocoa_event_utils.mm",
85 "event_dispatcher.cc",
96 "event_target_iterator.h",
103 "gestures/gesture_point.cc",
104 "gestures/gesture_point.h",
105 "gestures/gesture_recognizer.h",
106 "gestures/gesture_recognizer_impl.cc",
107 "gestures/gesture_recognizer_impl.h",
108 "gestures/gesture_recognizer_impl_mac.cc",
109 "gestures/gesture_sequence.cc",
110 "gestures/gesture_sequence.h",
111 "gestures/gesture_types.h",
112 "gestures/unified_gesture_detector_enabled.cc",
113 "gestures/unified_gesture_detector_enabled.h",
114 "gestures/velocity_calculator.cc",
115 "gestures/velocity_calculator.h",
116 "platform/x11/x11_event_source.cc",
117 "platform/x11/x11_event_source.h",
124 "//build/config/linux:glib",
125 "//build/config/linux:x11",
129 "platform/x11/x11_event_source.cc",
130 "platform/x11/x11_event_source.h",
135 if (!is_chromeos && is_linux) {
137 "linux/text_edit_command_auralinux.cc",
138 "linux/text_edit_command_auralinux.h",
139 "linux/text_edit_key_bindings_delegate_auralinux.cc",
140 "linux/text_edit_key_bindings_delegate_auralinux.h",
146 "ozone/device/udev/device_manager_udev.cc",
147 "ozone/device/udev/device_manager_udev.h",
148 "ozone/evdev/event_converter_evdev.cc",
149 "ozone/evdev/event_converter_evdev.h",
150 "ozone/evdev/event_device_info.cc",
151 "ozone/evdev/event_device_info.h",
152 "ozone/evdev/event_factory_evdev.cc",
153 "ozone/evdev/event_factory_evdev.h",
154 "ozone/evdev/event_modifiers_evdev.cc",
155 "ozone/evdev/event_modifiers_evdev.h",
156 "ozone/evdev/key_event_converter_evdev.cc",
157 "ozone/evdev/key_event_converter_evdev.h",
158 "ozone/evdev/touch_event_converter_evdev.cc",
159 "ozone/evdev/touch_event_converter_evdev.h",
160 "ozone/event_factory_ozone.cc",
161 "ozone/event_factory_ozone.h",
162 "ozone/events_ozone.cc",
168 "gestures/gesture_provider_aura.cc",
169 "gestures/gesture_provider_aura.h",
170 "gestures/motion_event_aura.cc",
171 "gestures/motion_event_aura.h",
175 if (is_win || use_x11 || use_ozone) {
176 sources -= [ "events_stub.cc" ]
180 component("gesture_detection") {
182 "gesture_detection/bitset_32.h",
183 "gesture_detection/filtered_gesture_provider.cc",
184 "gesture_detection/filtered_gesture_provider.h",
185 "gesture_detection/gesture_detection_export.h",
186 "gesture_detection/gesture_detector.cc",
187 "gesture_detection/gesture_detector.h",
188 "gesture_detection/gesture_event_data.cc",
189 "gesture_detection/gesture_event_data.h",
190 "gesture_detection/gesture_event_data_packet.cc",
191 "gesture_detection/gesture_event_data_packet.h",
192 "gesture_detection/gesture_config_helper.h",
193 "gesture_detection/gesture_provider.cc",
194 "gesture_detection/gesture_provider.h",
195 "gesture_detection/motion_event.h",
196 "gesture_detection/scale_gesture_detector.cc",
197 "gesture_detection/scale_gesture_detector.h",
198 "gesture_detection/snap_scroll_controller.cc",
199 "gesture_detection/snap_scroll_controller.h",
200 "gesture_detection/touch_disposition_gesture_filter.cc",
201 "gesture_detection/touch_disposition_gesture_filter.h",
202 "gesture_detection/velocity_tracker_state.cc",
203 "gesture_detection/velocity_tracker_state.h",
204 "gesture_detection/velocity_tracker.cc",
205 "gesture_detection/velocity_tracker.h",
215 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
218 sources += [ "gesture_detection/gesture_config_helper_android.cc" ]
219 } else if (use_aura) {
220 sources += [ "gesture_detection/gesture_config_helper_aura.cc" ]
222 sources += [ "gesture_detection/gesture_config_helper.cc" ]
226 source_set("events_test_support") {
228 "test/cocoa_test_event_utils.h",
229 "test/cocoa_test_event_utils.mm",
230 "test/events_test_utils.cc",
231 "test/events_test_utils.h",
232 "test/events_test_utils_x11.cc",
233 "test/events_test_utils_x11.h",
234 "test/platform_event_waiter.cc",
235 "test/platform_event_waiter.h",
236 "test/test_event_handler.cc",
237 "test/test_event_handler.h",
238 "test/test_event_processor.cc",
239 "test/test_event_processor.h",
240 "test/test_event_target.cc",
241 "test/test_event_target.h",
252 "test/cocoa_test_event_utils.h",
253 "test/cocoa_test_event_utils.mm",
258 configs += [ "//build/config/linux:x11" ]
261 "test/events_test_utils_x11.cc",
262 "test/events_test_utils_x11.h",
267 test("events_unittests") {
269 "cocoa/events_mac_unittest.mm",
270 "event_dispatcher_unittest.cc",
271 "event_processor_unittest.cc",
272 "event_rewriter_unittest.cc",
274 "gestures/velocity_calculator_unittest.cc",
275 "gesture_detection/bitset_32_unittest.cc",
276 "gesture_detection/gesture_provider_unittest.cc",
277 "gesture_detection/mock_motion_event.h",
278 "gesture_detection/mock_motion_event.cc",
279 "gesture_detection/velocity_tracker_unittest.cc",
280 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
281 "keycodes/dom4/keycode_converter_unittest.cc",
282 "latency_info_unittest.cc",
283 "platform/platform_event_source_unittest.cc",
284 "x/events_x_unittest.cc",
289 "x/events_x_unittest.cc",
295 "ozone/evdev/key_event_converter_evdev_unittest.cc",
296 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
303 ":events_test_support",
304 ":gesture_detection",
306 "//base/test:run_all_unittests",
309 "//ui/gfx:gfx_test_support",