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_recognizer_impl_mac.cc",
112 "gestures/gesture_types.h",
119 "//build/config/linux:glib",
120 "//build/config/linux:x11",
128 if (!is_chromeos && is_linux) {
130 "linux/text_edit_command_auralinux.cc",
131 "linux/text_edit_command_auralinux.h",
132 "linux/text_edit_key_bindings_delegate_auralinux.cc",
133 "linux/text_edit_key_bindings_delegate_auralinux.h",
139 "ozone/events_ozone.cc",
145 "gestures/gesture_provider_aura.cc",
146 "gestures/gesture_provider_aura.h",
147 "gestures/motion_event_aura.cc",
148 "gestures/motion_event_aura.h",
149 "gestures/gesture_recognizer.h",
150 "gestures/gesture_recognizer_impl.cc",
151 "gestures/gesture_recognizer_impl.h",
155 if (is_win || is_mac || use_x11 || use_ozone) {
156 sources -= [ "events_stub.cc" ]
160 component("gesture_detection") {
162 "gesture_detection/bitset_32.h",
163 "gesture_detection/filtered_gesture_provider.cc",
164 "gesture_detection/filtered_gesture_provider.h",
165 "gesture_detection/gesture_detection_export.h",
166 "gesture_detection/gesture_detector.cc",
167 "gesture_detection/gesture_detector.h",
168 "gesture_detection/gesture_event_data.cc",
169 "gesture_detection/gesture_event_data.h",
170 "gesture_detection/gesture_event_data_packet.cc",
171 "gesture_detection/gesture_event_data_packet.h",
172 "gesture_detection/gesture_config_helper.h",
173 "gesture_detection/gesture_provider.cc",
174 "gesture_detection/gesture_provider.h",
175 "gesture_detection/motion_event.cc",
176 "gesture_detection/motion_event.h",
177 "gesture_detection/motion_event_buffer.cc",
178 "gesture_detection/motion_event_buffer.h",
179 "gesture_detection/motion_event_generic.cc",
180 "gesture_detection/motion_event_generic.h",
181 "gesture_detection/scale_gesture_detector.cc",
182 "gesture_detection/scale_gesture_detector.h",
183 "gesture_detection/snap_scroll_controller.cc",
184 "gesture_detection/snap_scroll_controller.h",
185 "gesture_detection/touch_disposition_gesture_filter.cc",
186 "gesture_detection/touch_disposition_gesture_filter.h",
187 "gesture_detection/velocity_tracker_state.cc",
188 "gesture_detection/velocity_tracker_state.h",
189 "gesture_detection/velocity_tracker.cc",
190 "gesture_detection/velocity_tracker.h",
200 defines = [ "GESTURE_DETECTION_IMPLEMENTATION" ]
203 sources += [ "gesture_detection/gesture_config_helper_android.cc" ]
204 } else if (use_aura) {
205 sources += [ "gesture_detection/gesture_config_helper_aura.cc" ]
207 sources += [ "gesture_detection/gesture_config_helper.cc" ]
211 source_set("test_support") {
213 "test/cocoa_test_event_utils.h",
214 "test/cocoa_test_event_utils.mm",
215 "test/event_generator.cc",
216 "test/event_generator.h",
217 "test/events_test_utils.cc",
218 "test/events_test_utils.h",
219 "test/events_test_utils_x11.cc",
220 "test/events_test_utils_x11.h",
221 "test/mock_motion_event.cc",
222 "test/mock_motion_event.h",
223 "test/platform_event_waiter.cc",
224 "test/platform_event_waiter.h",
225 "test/test_event_handler.cc",
226 "test/test_event_handler.h",
227 "test/test_event_processor.cc",
228 "test/test_event_processor.h",
229 "test/test_event_target.cc",
230 "test/test_event_target.h",
236 "//ui/events/platform",
240 ":gesture_detection",
245 "test/cocoa_test_event_utils.h",
246 "test/cocoa_test_event_utils.mm",
252 "test/events_test_utils_x11.cc",
253 "test/events_test_utils_x11.h",
258 test("events_unittests") {
260 "cocoa/events_mac_unittest.mm",
261 "event_dispatcher_unittest.cc",
262 "event_processor_unittest.cc",
263 "event_rewriter_unittest.cc",
265 "gesture_detection/bitset_32_unittest.cc",
266 "gesture_detection/gesture_event_data_packet_unittest.cc",
267 "gesture_detection/gesture_provider_unittest.cc",
268 "gesture_detection/motion_event_buffer_unittest.cc",
269 "gesture_detection/motion_event_generic_unittest.cc",
270 "gesture_detection/touch_disposition_gesture_filter_unittest.cc",
271 "gesture_detection/velocity_tracker_unittest.cc",
272 "keycodes/dom4/keycode_converter_unittest.cc",
273 "latency_info_unittest.cc",
274 "platform/platform_event_source_unittest.cc",
275 "x/events_x_unittest.cc",
279 ":dom4_keycode_converter",
282 ":gesture_detection",
285 "//base/test:run_all_unittests",
288 "//ui/events/platform",
289 "//ui/gfx:test_support",
293 configs += [ "//build/config/linux:x11" ]
294 deps += [ "//ui/gfx/x" ]
297 "x/events_x_unittest.cc",
303 "ozone/evdev/key_event_converter_evdev_unittest.cc",
304 "ozone/evdev/touch_event_converter_evdev_unittest.cc",
310 "gestures/gesture_provider_aura_unittest.cc",