Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / events / events.gyp
blob9e63434b6a129f7baa1fac35334a5b186b499f14
1 # Copyright 2013 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       # GN version: //ui/events:dom4_keycode_converter
12       'target_name': 'dom4_keycode_converter',
13       'type': 'static_library',
14       'dependencies': [
15         '<(DEPTH)/base/base.gyp:base',
16       ],
17       'sources': [
18         # Note: sources list duplicated in GN build.
19         'keycodes/dom3/dom_code.h',
20         'keycodes/dom3/dom_key.h',
21         'keycodes/dom3/dom_key_data.h',
22         'keycodes/dom4/keycode_converter.cc',
23         'keycodes/dom4/keycode_converter.h',
24         'keycodes/dom4/keycode_converter_data.h',
25       ],
26     },
27     {
28       # GN version: //ui/events:events_base
29       'target_name': 'events_base',
30       'type': '<(component)',
31       'dependencies': [
32         '<(DEPTH)/base/base.gyp:base',
33         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
34         '<(DEPTH)/skia/skia.gyp:skia',
35         '../gfx/gfx.gyp:gfx',
36         '../gfx/gfx.gyp:gfx_geometry',
37         'dom4_keycode_converter',
38       ],
39       'defines': [
40         'EVENTS_BASE_IMPLEMENTATION',
41       ],
42       'sources': [
43         # Note: sources list duplicated in GN build.
44         'android/scroller.cc',
45         'android/scroller.h',
46         'event_constants.h',
47         'event_switches.cc',
48         'event_switches.h',
49         'events_base_export.h',
50         'gesture_curve.h',
51         'gesture_event_details.cc',
52         'gesture_event_details.h',
53         'gestures/fling_curve.cc',
54         'gestures/fling_curve.h',
55         'keycodes/keyboard_code_conversion.cc',
56         'keycodes/keyboard_code_conversion.h',
57         'keycodes/keyboard_code_conversion_android.cc',
58         'keycodes/keyboard_code_conversion_android.h',
59         'keycodes/keyboard_code_conversion_mac.h',
60         'keycodes/keyboard_code_conversion_mac.mm',
61         'keycodes/keyboard_code_conversion_win.cc',
62         'keycodes/keyboard_code_conversion_win.h',
63         'keycodes/keyboard_code_conversion_x.cc',
64         'keycodes/keyboard_code_conversion_x.h',
65         'keycodes/keyboard_codes.h',
66         'latency_info.cc',
67         'latency_info.h',
68         'x/keysym_to_unicode.cc',
69         'x/keysym_to_unicode.h',
70       ],
71       'export_dependent_settings': [
72         '../../ui/gfx/gfx.gyp:gfx',
73       ],
74       'conditions': [
75         ['use_x11==1', {
76           'dependencies': [
77             '../../build/linux/system.gyp:x11',
78             '../gfx/x/gfx_x11.gyp:gfx_x11',
79           ],
80         }],
81       ],
82     },
83     {
84       # GN version: //ui/events
85       'target_name': 'events',
86       'type': '<(component)',
87       'dependencies': [
88         '<(DEPTH)/base/base.gyp:base',
89         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
90         '<(DEPTH)/skia/skia.gyp:skia',
91         '../gfx/gfx.gyp:gfx',
92         '../gfx/gfx.gyp:gfx_geometry',
93         'dom4_keycode_converter',
94         'events_base',
95         'gesture_detection',
96       ],
97       'defines': [
98         'EVENTS_IMPLEMENTATION',
99       ],
100       'sources': [
101         # Note: sources list duplicated in GN build.
102         'cocoa/cocoa_event_utils.h',
103         'cocoa/cocoa_event_utils.mm',
104         'cocoa/events_mac.mm',
105         'event.cc',
106         'event.h',
107         'event_dispatcher.cc',
108         'event_dispatcher.h',
109         'event_handler.cc',
110         'event_handler.h',
111         'event_processor.cc',
112         'event_processor.h',
113         'event_rewriter.h',
114         'event_source.cc',
115         'event_source.h',
116         'event_target.cc',
117         'event_target.h',
118         'event_target_iterator.h',
119         'event_targeter.cc',
120         'event_targeter.h',
121         'event_utils.cc',
122         'event_utils.h',
123         'events_export.h',
124         'events_stub.cc',
125         'gestures/gesture_provider_aura.cc',
126         'gestures/gesture_provider_aura.h',
127         'gestures/gesture_recognizer.h',
128         'gestures/gesture_recognizer_impl.cc',
129         'gestures/gesture_recognizer_impl.h',
130         'gestures/gesture_recognizer_impl_mac.cc',
131         'gestures/gesture_types.h',
132         'gestures/motion_event_aura.cc',
133         'gestures/motion_event_aura.h',
134         'linux/text_edit_command_auralinux.cc',
135         'linux/text_edit_command_auralinux.h',
136         'linux/text_edit_key_bindings_delegate_auralinux.cc',
137         'linux/text_edit_key_bindings_delegate_auralinux.h',
138         'null_event_targeter.cc',
139         'null_event_targeter.h',
140         'ozone/events_ozone.cc',
141         'win/events_win.cc',
142         'x/events_x.cc',
143       ],
144       'conditions': [
145         ['use_x11==1', {
146           'dependencies': [
147             'devices/events_devices.gyp:events_devices',
148             '../gfx/x/gfx_x11.gyp:gfx_x11',
149             '../../build/linux/system.gyp:x11',
150           ],
151         }],
152         ['use_aura==0', {
153           'sources!': [
154             'gestures/gesture_provider_aura.cc',
155             'gestures/gesture_provider_aura.h',
156             'gestures/gesture_recognizer.h',
157             'gestures/gesture_recognizer_impl.cc',
158             'gestures/gesture_recognizer_impl.h',
159             'gestures/gesture_types.h',
160             'gestures/motion_event_aura.cc',
161             'gestures/motion_event_aura.h',
162           ],
163         }],
164         # We explicitly enumerate the platforms we _do_ provide native cracking
165         # for here.
166         ['OS=="win" or OS=="mac" or use_x11==1 or use_ozone==1', {
167           'sources!': [
168             'events_stub.cc',
169           ],
170         }],
171         ['chromeos==1', {
172           'sources!': [
173             'linux/text_edit_command_auralinux.cc',
174             'linux/text_edit_command_auralinux.h',
175             'linux/text_edit_key_bindings_delegate_auralinux.cc',
176             'linux/text_edit_key_bindings_delegate_auralinux.h',
177           ],
178         }],
179         ['use_ozone==1', {
180           'dependencies': [
181             'ozone/events_ozone.gyp:events_ozone_layout',
182           ],
183         }],
184       ],
185     },
186     {
187       # GN version: //ui/events/blink
188       'target_name': 'blink',
189       'type': 'static_library',
190       'dependencies': [
191         '../../third_party/WebKit/public/blink_headers.gyp:blink_headers',
192         '../gfx/gfx.gyp:gfx_geometry',
193         'events',
194         'gesture_detection',
195       ],
196       'sources': [
197         # Note: sources list duplicated in GN build.
198         'blink/blink_event_util.cc',
199         'blink/blink_event_util.h',
200       ],
201     },
202     {
203       # GN version: //ui/events/gestures/blink
204       'target_name': 'gestures_blink',
205       'type': 'static_library',
206       'dependencies': [
207         '../../base/base.gyp:base',
208         '../../third_party/WebKit/public/blink_headers.gyp:blink_headers',
209         '../gfx/gfx.gyp:gfx_geometry',
210         'events',
211         'gesture_detection',
212       ],
213       'sources': [
214         # Note: sources list duplicated in GN build.
215         'gestures/blink/web_gesture_curve_impl.cc',
216         'gestures/blink/web_gesture_curve_impl.h',
217       ],
218     },
219     {
220       # GN version: //ui/events:gesture_detection
221       'target_name': 'gesture_detection',
222       'type': '<(component)',
223       'dependencies': [
224         '<(DEPTH)/base/base.gyp:base',
225         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
226         '../gfx/gfx.gyp:gfx',
227         '../gfx/gfx.gyp:gfx_geometry',
228         'events_base',
229       ],
230       'defines': [
231         'GESTURE_DETECTION_IMPLEMENTATION',
232       ],
233       'sources': [
234         # Note: sources list duplicated in GN build.
235         'gesture_detection/bitset_32.h',
236         'gesture_detection/filtered_gesture_provider.cc',
237         'gesture_detection/filtered_gesture_provider.h',
238         'gesture_detection/gesture_configuration.cc',
239         'gesture_detection/gesture_configuration.h',
240         'gesture_detection/gesture_configuration_android.cc',
241         'gesture_detection/gesture_configuration_aura.cc',
242         'gesture_detection/gesture_detection_export.h',
243         'gesture_detection/gesture_detector.cc',
244         'gesture_detection/gesture_detector.h',
245         'gesture_detection/gesture_event_data.cc',
246         'gesture_detection/gesture_event_data.h',
247         'gesture_detection/gesture_event_data_packet.cc',
248         'gesture_detection/gesture_event_data_packet.h',
249         'gesture_detection/gesture_listeners.cc',
250         'gesture_detection/gesture_listeners.h',
251         'gesture_detection/gesture_provider.cc',
252         'gesture_detection/gesture_provider.h',
253         'gesture_detection/gesture_provider_config_helper.cc',
254         'gesture_detection/gesture_provider_config_helper.h',
255         'gesture_detection/gesture_touch_uma_histogram.cc',
256         'gesture_detection/gesture_touch_uma_histogram.h',
257         'gesture_detection/motion_event.cc',
258         'gesture_detection/motion_event.h',
259         'gesture_detection/motion_event_buffer.cc',
260         'gesture_detection/motion_event_buffer.h',
261         'gesture_detection/motion_event_generic.cc',
262         'gesture_detection/motion_event_generic.h',
263         'gesture_detection/scale_gesture_detector.cc',
264         'gesture_detection/scale_gesture_detector.h',
265         'gesture_detection/scale_gesture_listeners.cc',
266         'gesture_detection/scale_gesture_listeners.h',
267         'gesture_detection/snap_scroll_controller.cc',
268         'gesture_detection/snap_scroll_controller.h',
269         'gesture_detection/touch_disposition_gesture_filter.cc',
270         'gesture_detection/touch_disposition_gesture_filter.h',
271         'gesture_detection/velocity_tracker.cc',
272         'gesture_detection/velocity_tracker.h',
273         'gesture_detection/velocity_tracker_state.cc',
274         'gesture_detection/velocity_tracker_state.h',
275       ],
276       'conditions': [
277         ['use_aura!=1 and OS!="android"', {
278           'sources': [
279             'gesture_detection/gesture_configuration_default.cc',
280           ],
281         }],
282       ],
283     },
284     {
285       # GN version: //ui/events:test_support
286       'target_name': 'events_test_support',
287       'type': 'static_library',
288       'dependencies': [
289         '<(DEPTH)/base/base.gyp:base',
290         '<(DEPTH)/skia/skia.gyp:skia',
291         '../gfx/gfx.gyp:gfx_geometry',
292         'events',
293         'events_base',
294         'gesture_detection',
295         'platform/events_platform.gyp:events_platform',
296       ],
297       'sources': [
298         # Note: sources list duplicated in GN build.
299         'test/cocoa_test_event_utils.h',
300         'test/cocoa_test_event_utils.mm',
301         'test/event_generator.cc',
302         'test/event_generator.h',
303         'test/events_test_utils.cc',
304         'test/events_test_utils.h',
305         'test/events_test_utils_x11.cc',
306         'test/events_test_utils_x11.h',
307         'test/motion_event_test_utils.cc',
308         'test/motion_event_test_utils.h',
309         'test/platform_event_waiter.cc',
310         'test/platform_event_waiter.h',
311         'test/test_event_handler.cc',
312         'test/test_event_handler.h',
313         'test/test_event_processor.cc',
314         'test/test_event_processor.h',
315         'test/test_event_target.cc',
316         'test/test_event_target.h',
317       ],
318       'conditions': [
319         ['OS=="ios"', {
320           # The cocoa files don't apply to iOS.
321           'sources/': [['exclude', 'cocoa']],
322         }],
323         ['use_x11==1', {
324           'dependencies': [
325             'devices/events_devices.gyp:events_devices',
326           ],
327         }],
328       ],
329     },
330     {
331       # GN version: //ui/events:events_unittests
332       'target_name': 'events_unittests',
333       'type': '<(gtest_target_type)',
334       'dependencies': [
335         '<(DEPTH)/base/base.gyp:base',
336         '<(DEPTH)/base/base.gyp:run_all_unittests',
337         '<(DEPTH)/base/base.gyp:test_support_base',
338         '<(DEPTH)/skia/skia.gyp:skia',
339         '<(DEPTH)/testing/gtest.gyp:gtest',
340         '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
341         '../gfx/gfx.gyp:gfx',
342         '../gfx/gfx.gyp:gfx_geometry',
343         '../gfx/gfx.gyp:gfx_test_support',
344         'devices/events_devices.gyp:events_devices',
345         'dom4_keycode_converter',
346         'events',
347         'events_base',
348         'events_test_support',
349         'gesture_detection',
350         'gestures_blink',
351         'platform/events_platform.gyp:events_platform',
352       ],
353       'sources': [
354         # Note: sources list duplicated in GN build.
355         'android/scroller_unittest.cc',
356         'cocoa/events_mac_unittest.mm',
357         'devices/x11/device_data_manager_x11_unittest.cc',
358         'event_dispatcher_unittest.cc',
359         'event_processor_unittest.cc',
360         'event_rewriter_unittest.cc',
361         'event_unittest.cc',
362         'gesture_detection/bitset_32_unittest.cc',
363         'gesture_detection/filtered_gesture_provider_unittest.cc',
364         'gesture_detection/gesture_event_data_packet_unittest.cc',
365         'gesture_detection/gesture_provider_unittest.cc',
366         'gesture_detection/motion_event_buffer_unittest.cc',
367         'gesture_detection/motion_event_generic_unittest.cc',
368         'gesture_detection/snap_scroll_controller_unittest.cc',
369         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
370         'gesture_detection/velocity_tracker_unittest.cc',
371         'gestures/blink/web_gesture_curve_impl_unittest.cc',
372         'gestures/fling_curve_unittest.cc',
373         'gestures/gesture_provider_aura_unittest.cc',
374         'gestures/motion_event_aura_unittest.cc',
375         'keycodes/dom4/keycode_converter_unittest.cc',
376         'latency_info_unittest.cc',
377         'platform/platform_event_source_unittest.cc',
378         'x/events_x_unittest.cc',
379       ],
380       'include_dirs': [
381         '../../testing/gmock/include',
382       ],
383       'conditions': [
384         ['use_x11==1', {
385           'dependencies': [
386             '../../build/linux/system.gyp:x11',
387             '../gfx/x/gfx_x11.gyp:gfx_x11',
388           ],
389         }],
390         ['use_ozone==1', {
391           'sources': [
392             'ozone/chromeos/cursor_controller_unittest.cc',
393             'ozone/evdev/event_converter_evdev_impl_unittest.cc',
394             'ozone/evdev/event_converter_test_util.cc',
395             'ozone/evdev/event_device_info_unittest.cc',
396             'ozone/evdev/event_device_test_util.cc',
397             'ozone/evdev/input_injector_evdev_unittest.cc',
398             'ozone/evdev/tablet_event_converter_evdev_unittest.cc',
399             'ozone/evdev/touch_event_converter_evdev_unittest.cc',
400             'ozone/evdev/touch_noise/touch_noise_finder_unittest.cc',
401           ],
402           'dependencies': [
403             'ozone/events_ozone.gyp:events_ozone',
404             'ozone/events_ozone.gyp:events_ozone_evdev',
405             'ozone/events_ozone.gyp:events_ozone_layout',
406           ]
407         }],
408         ['use_xkbcommon==1', {
409           'sources': [
410             'ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc',
411           ]
412         }],
413         ['use_aura==0', {
414           'sources!': [
415             'gestures/gesture_provider_aura_unittest.cc',
416             'gestures/motion_event_aura_unittest.cc',
417           ],
418         }],
419         ['OS=="linux" and use_allocator!="none"', {
420           'dependencies': [
421             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
422           ],
423         }],
424         # Exclude tests that rely on event_utils.h for platforms that do not
425         # provide native cracking, i.e., platforms that use events_stub.cc.
426         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
427           'sources!': [
428             'event_unittest.cc',
429           ],
430         }],
431         ['OS == "android"', {
432           'dependencies': [
433             '../../testing/android/native_test.gyp:native_test_native_code',
434           ],
435         }],
436       ],
437     },
438   ],
439   'conditions': [
440     ['OS == "android"', {
441       'targets': [
442         {
443           'target_name': 'events_unittests_apk',
444           'type': 'none',
445           'dependencies': [
446             'events_unittests',
447           ],
448           'variables': {
449             'test_suite_name': 'events_unittests',
450           },
451           'includes': [ '../../build/apk_test.gypi' ],
452         },
453       ],
454     }],
455     ['test_isolation_mode != "noop"', {
456       'targets': [
457         {
458           'target_name': 'events_unittests_run',
459           'type': 'none',
460           'dependencies': [
461             'events_unittests',
462           ],
463           'includes': [
464             '../../build/isolate.gypi',
465           ],
466           'sources': [
467             'events_unittests.isolate',
468           ],
469           'conditions': [
470             ['use_x11 == 1', {
471               'dependencies': [
472                 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
473               ],
474             }],
475           ],
476         },
477       ],
478     }],
479   ],