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 "device_data_manager.cc",
20 "device_data_manager.h",
24 "events_base_export.h",
25 "gesture_event_details.cc",
26 "gesture_event_details.h",
27 "gestures/gesture_configuration.cc",
28 "gestures/gesture_configuration.h",
29 "keycodes/keyboard_code_conversion.cc",
30 "keycodes/keyboard_code_conversion.h",
31 "keycodes/keyboard_code_conversion_android.cc",
32 "keycodes/keyboard_code_conversion_android.h",
33 "keycodes/keyboard_code_conversion_mac.h",
34 "keycodes/keyboard_code_conversion_mac.mm",
35 "keycodes/keyboard_code_conversion_win.cc",
36 "keycodes/keyboard_code_conversion_win.h",
37 "keycodes/keyboard_codes.h",
42 defines = [ "EVENTS_BASE_IMPLEMENTATION" ]
45 ":dom4_keycode_converter",
47 "//base/third_party/dynamic_annotations",
49 "//ui/events/platform",
54 forward_dependent_configs_from = [ "//ui/gfx" ]
57 configs += [ "//build/config/linux:x11" ]
60 "keycodes/keyboard_code_conversion_x.cc",
61 "keycodes/keyboard_code_conversion_x.h",
62 "x/device_data_manager_x11.cc",
63 "x/device_data_manager_x11.h",
64 "x/device_list_cache_x.cc",
65 "x/device_list_cache_x.h",
66 "x/keysym_to_unicode.cc",
67 "x/keysym_to_unicode.h",
68 "x/touch_factory_x11.cc",
69 "x/touch_factory_x11.h",
76 ":dom4_keycode_converter",
79 "//base/third_party/dynamic_annotations",
85 defines = [ "EVENTS_IMPLEMENTATION" ]
88 "cocoa/cocoa_event_utils.h",
89 "cocoa/cocoa_event_utils.mm",
90 "cocoa/events_mac.mm",
93 "event_dispatcher.cc",
104 "event_target_iterator.h",
111 "gestures/gesture_point.cc",
112 "gestures/gesture_point.h",
113 "gestures/gesture_recognizer_impl_mac.cc",
114 "gestures/gesture_sequence.cc",
115 "gestures/gesture_sequence.h",
116 "gestures/gesture_types.h",
117 "gestures/unified_gesture_detector_enabled.cc",
118 "gestures/unified_gesture_detector_enabled.h",
119 "gestures/velocity_calculator.cc",
120 "gestures/velocity_calculator.h",
127 "//build/config/linux:glib",
128 "//build/config/linux:x11",
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",
147 "ozone/events_ozone.cc",
153 "gestures/gesture_provider_aura.cc",
154 "gestures/gesture_provider_aura.h",
155 "gestures/motion_event_aura.cc",
156 "gestures/motion_event_aura.h",
157 "gestures/gesture_recognizer.h",
158 "gestures/gesture_recognizer_impl.cc",
159 "gestures/gesture_recognizer_impl.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_detection_export.h",
174 "gesture_detection/gesture_detector.cc",
175 "gesture_detection/gesture_detector.h",
176 "gesture_detection/gesture_event_data.cc",
177 "gesture_detection/gesture_event_data.h",
178 "gesture_detection/gesture_event_data_packet.cc",
179 "gesture_detection/gesture_event_data_packet.h",
180 "gesture_detection/gesture_config_helper.h",
181 "gesture_detection/gesture_provider.cc",
182 "gesture_detection/gesture_provider.h",
183 "gesture_detection/motion_event.cc",
184 "gesture_detection/motion_event.h",
185 "gesture_detection/motion_event_buffer.cc",
186 "gesture_detection/motion_event_buffer.h",
187 "gesture_detection/motion_event_generic.cc",
188 "gesture_detection/motion_event_generic.h",
189 "gesture_detection/scale_gesture_detector.cc",
190 "gesture_detection/scale_gesture_detector.h",
191 "gesture_detection/snap_scroll_controller.cc",
192 "gesture_detection/snap_scroll_controller.h",
193 "gesture_detection/touch_disposition_gesture_filter.cc",
194 "gesture_detection/touch_disposition_gesture_filter.h",
195 "gesture_detection/velocity_tracker_state.cc",
196 "gesture_detection/velocity_tracker_state.h",
197 "gesture_detection/velocity_tracker.cc",
198 "gesture_detection/velocity_tracker.h",
208 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
211 sources += [ "gesture_detection/gesture_config_helper_android.cc" ]
212 } else if (use_aura) {
213 sources += [ "gesture_detection/gesture_config_helper_aura.cc" ]
215 sources += [ "gesture_detection/gesture_config_helper.cc" ]
219 source_set("test_support") {
221 "test/cocoa_test_event_utils.h",
222 "test/cocoa_test_event_utils.mm",
223 "test/event_generator.cc",
224 "test/event_generator.h",
225 "test/events_test_utils.cc",
226 "test/events_test_utils.h",
227 "test/events_test_utils_x11.cc",
228 "test/events_test_utils_x11.h",
229 "test/mock_motion_event.cc",
230 "test/mock_motion_event.h",
231 "test/platform_event_waiter.cc",
232 "test/platform_event_waiter.h",
233 "test/test_event_handler.cc",
234 "test/test_event_handler.h",
235 "test/test_event_processor.cc",
236 "test/test_event_processor.h",
237 "test/test_event_target.cc",
238 "test/test_event_target.h",
244 "//ui/events/platform",
248 ":gesture_detection",
253 "test/cocoa_test_event_utils.h",
254 "test/cocoa_test_event_utils.mm",
260 "test/events_test_utils_x11.cc",
261 "test/events_test_utils_x11.h",
266 test("events_unittests") {
268 "cocoa/events_mac_unittest.mm",
269 "event_dispatcher_unittest.cc",
270 "event_processor_unittest.cc",
271 "event_rewriter_unittest.cc",
273 "gestures/velocity_calculator_unittest.cc",
274 "gesture_detection/bitset_32_unittest.cc",
275 "gesture_detection/gesture_event_data_packet_unittest.cc",
276 "gesture_detection/gesture_provider_unittest.cc",
277 "gesture_detection/motion_event_buffer_unittest.cc",
278 "gesture_detection/motion_event_generic_unittest.cc",
279 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
280 "gesture_detection/velocity_tracker_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",
288 ":dom4_keycode_converter",
291 ":gesture_detection",
294 "//base/test:run_all_unittests",
297 "//ui/events/platform",
298 "//ui/gfx:test_support",
302 configs += [ "//build/config/linux:x11" ]
303 deps += [ "//ui/gfx/x" ]
306 "x/events_x_unittest.cc",
312 "ozone/evdev/key_event_converter_evdev_unittest.cc",
313 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
319 "gestures/gesture_provider_aura_unittest.cc",