Suppress data races in blink::Scheduler
[chromium-blink-merge.git] / ui / events / events.gyp
blob944c02ca91755b7f75b768b789bb4bef17e81a21
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         'ozone/events_ozone.cc',
135         'win/events_win.cc',
136         'x/events_x.cc',
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',
141       ],
142       'conditions': [
143         ['use_x11==1', {
144           'dependencies': [
145             'devices/events_devices.gyp:events_devices',
146             '../gfx/x/gfx_x11.gyp:gfx_x11',
147             '../../build/linux/system.gyp:x11',
148           ],
149         }],
150         ['use_aura==0', {
151           'sources!': [
152             'gestures/gesture_provider_aura.cc',
153             'gestures/gesture_provider_aura.h',
154             'gestures/gesture_recognizer.h',
155             'gestures/gesture_recognizer_impl.cc',
156             'gestures/gesture_recognizer_impl.h',
157             'gestures/gesture_types.h',
158             'gestures/motion_event_aura.cc',
159             'gestures/motion_event_aura.h',
160           ],
161         }],
162         # We explicitly enumerate the platforms we _do_ provide native cracking
163         # for here.
164         ['OS=="win" or OS=="mac" or use_x11==1 or use_ozone==1', {
165           'sources!': [
166             'events_stub.cc',
167           ],
168         }],
169         ['chromeos==1', {
170           'sources!': [
171             'linux/text_edit_command_auralinux.cc',
172             'linux/text_edit_command_auralinux.h',
173             'linux/text_edit_key_bindings_delegate_auralinux.cc',
174             'linux/text_edit_key_bindings_delegate_auralinux.h',
175           ],
176         }],
177         ['use_ozone==1', {
178           'dependencies': [
179             'ozone/events_ozone.gyp:events_ozone_layout',
180           ],
181         }],
182       ],
183     },
184     {
185       # GN version: //ui/events:gesture_detection
186       'target_name': 'gesture_detection',
187       'type': '<(component)',
188       'dependencies': [
189         '<(DEPTH)/base/base.gyp:base',
190         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
191         '../gfx/gfx.gyp:gfx',
192         '../gfx/gfx.gyp:gfx_geometry',
193         'events_base',
194       ],
195       'defines': [
196         'GESTURE_DETECTION_IMPLEMENTATION',
197       ],
198       'sources': [
199         # Note: sources list duplicated in GN build.
200         'gesture_detection/bitset_32.h',
201         'gesture_detection/filtered_gesture_provider.cc',
202         'gesture_detection/filtered_gesture_provider.h',
203         'gesture_detection/gesture_configuration.cc',
204         'gesture_detection/gesture_configuration.h',
205         'gesture_detection/gesture_configuration_android.cc',
206         'gesture_detection/gesture_configuration_aura.cc',
207         'gesture_detection/gesture_detection_export.h',
208         'gesture_detection/gesture_detector.cc',
209         'gesture_detection/gesture_detector.h',
210         'gesture_detection/gesture_event_data.cc',
211         'gesture_detection/gesture_event_data.h',
212         'gesture_detection/gesture_event_data_packet.cc',
213         'gesture_detection/gesture_event_data_packet.h',
214         'gesture_detection/gesture_listeners.cc',
215         'gesture_detection/gesture_listeners.h',
216         'gesture_detection/gesture_provider.cc',
217         'gesture_detection/gesture_provider.h',
218         "gesture_detection/gesture_provider_config_helper.cc",
219         "gesture_detection/gesture_provider_config_helper.h",
220         'gesture_detection/gesture_touch_uma_histogram.cc',
221         'gesture_detection/gesture_touch_uma_histogram.h',
222         'gesture_detection/motion_event.cc',
223         'gesture_detection/motion_event.h',
224         'gesture_detection/motion_event_buffer.cc',
225         'gesture_detection/motion_event_buffer.h',
226         'gesture_detection/motion_event_generic.cc',
227         'gesture_detection/motion_event_generic.h',
228         'gesture_detection/scale_gesture_detector.cc',
229         'gesture_detection/scale_gesture_detector.h',
230         'gesture_detection/scale_gesture_listeners.cc',
231         'gesture_detection/scale_gesture_listeners.h',
232         'gesture_detection/snap_scroll_controller.cc',
233         'gesture_detection/snap_scroll_controller.h',
234         'gesture_detection/touch_disposition_gesture_filter.cc',
235         'gesture_detection/touch_disposition_gesture_filter.h',
236         'gesture_detection/velocity_tracker_state.cc',
237         'gesture_detection/velocity_tracker_state.h',
238         'gesture_detection/velocity_tracker.cc',
239         'gesture_detection/velocity_tracker.h',
240       ],
241       'conditions': [
242         ['use_aura!=1 and OS!="android"', {
243           'sources': [
244             'gesture_detection/gesture_configuration_default.cc',
245           ],
246         }],
247       ],
248     },
249     {
250       # GN version: //ui/events:test_support
251       'target_name': 'events_test_support',
252       'type': 'static_library',
253       'dependencies': [
254         '<(DEPTH)/base/base.gyp:base',
255         '<(DEPTH)/skia/skia.gyp:skia',
256         '../gfx/gfx.gyp:gfx_geometry',
257         'events',
258         'events_base',
259         'gesture_detection',
260         'platform/events_platform.gyp:events_platform',
261       ],
262       'sources': [
263         # Note: sources list duplicated in GN build.
264         'test/cocoa_test_event_utils.h',
265         'test/cocoa_test_event_utils.mm',
266         'test/event_generator.cc',
267         'test/event_generator.h',
268         'test/events_test_utils.cc',
269         'test/events_test_utils.h',
270         'test/events_test_utils_x11.cc',
271         'test/events_test_utils_x11.h',
272         'test/motion_event_test_utils.cc',
273         'test/motion_event_test_utils.h',
274         'test/platform_event_waiter.cc',
275         'test/platform_event_waiter.h',
276         'test/test_event_handler.cc',
277         'test/test_event_handler.h',
278         'test/test_event_processor.cc',
279         'test/test_event_processor.h',
280         'test/test_event_target.cc',
281         'test/test_event_target.h',
282       ],
283       'conditions': [
284         ['OS=="ios"', {
285           # The cocoa files don't apply to iOS.
286           'sources/': [['exclude', 'cocoa']],
287         }],
288         ['use_x11==1', {
289           'dependencies': [
290             'devices/events_devices.gyp:events_devices',
291           ],
292         }],
293       ],
294     },
295     {
296       # GN version: //ui/events:events_unittests
297       'target_name': 'events_unittests',
298       'type': '<(gtest_target_type)',
299       'dependencies': [
300         '<(DEPTH)/base/base.gyp:base',
301         '<(DEPTH)/base/base.gyp:run_all_unittests',
302         '<(DEPTH)/base/base.gyp:test_support_base',
303         '<(DEPTH)/skia/skia.gyp:skia',
304         '<(DEPTH)/testing/gtest.gyp:gtest',
305         '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
306         '../gfx/gfx.gyp:gfx',
307         '../gfx/gfx.gyp:gfx_geometry',
308         '../gfx/gfx.gyp:gfx_test_support',
309         'devices/events_devices.gyp:events_devices',
310         'dom4_keycode_converter',
311         'events',
312         'events_base',
313         'events_test_support',
314         'gesture_detection',
315         'platform/events_platform.gyp:events_platform',
316       ],
317       'sources': [
318         # Note: sources list duplicated in GN build.
319         'android/scroller_unittest.cc',
320         'cocoa/events_mac_unittest.mm',
321         'devices/x11/device_data_manager_x11_unittest.cc',
322         'event_dispatcher_unittest.cc',
323         'event_processor_unittest.cc',
324         'event_rewriter_unittest.cc',
325         'event_unittest.cc',
326         'gesture_detection/bitset_32_unittest.cc',
327         'gesture_detection/filtered_gesture_provider_unittest.cc',
328         'gesture_detection/gesture_event_data_packet_unittest.cc',
329         'gesture_detection/gesture_provider_unittest.cc',
330         'gesture_detection/motion_event_buffer_unittest.cc',
331         'gesture_detection/motion_event_generic_unittest.cc',
332         'gesture_detection/snap_scroll_controller_unittest.cc',
333         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
334         'gesture_detection/velocity_tracker_unittest.cc',
335         'gestures/fling_curve_unittest.cc',
336         'gestures/gesture_provider_aura_unittest.cc',
337         'gestures/motion_event_aura_unittest.cc',
338         'keycodes/dom4/keycode_converter_unittest.cc',
339         'latency_info_unittest.cc',
340         'platform/platform_event_source_unittest.cc',
341         'x/events_x_unittest.cc',
342       ],
343       'include_dirs': [
344         '../../testing/gmock/include',
345       ],
346       'conditions': [
347         ['use_x11==1', {
348           'dependencies': [
349             '../../build/linux/system.gyp:x11',
350             '../gfx/x/gfx_x11.gyp:gfx_x11',
351           ],
352         }],
353         ['use_ozone==1', {
354           'sources': [
355             'ozone/chromeos/cursor_controller_unittest.cc',
356             'ozone/evdev/event_converter_evdev_impl_unittest.cc',
357             'ozone/evdev/event_converter_test_util.cc',
358             'ozone/evdev/input_injector_evdev_unittest.cc',
359             'ozone/evdev/tablet_event_converter_evdev_unittest.cc',
360             'ozone/evdev/touch_event_converter_evdev_unittest.cc',
361           ],
362           'dependencies': [
363             'ozone/events_ozone.gyp:events_ozone',
364             'ozone/events_ozone.gyp:events_ozone_evdev',
365             'ozone/events_ozone.gyp:events_ozone_layout',
366           ]
367         }],
368         ['use_xkbcommon==1', {
369           'sources': [
370             'ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc',
371           ]
372         }],
373         ['use_aura==0', {
374           'sources!': [
375             'gestures/gesture_provider_aura_unittest.cc',
376             'gestures/motion_event_aura_unittest.cc',
377           ],
378         }],
379         ['OS=="linux" and use_allocator!="none"', {
380           'dependencies': [
381             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
382           ],
383         }],
384         # Exclude tests that rely on event_utils.h for platforms that do not
385         # provide native cracking, i.e., platforms that use events_stub.cc.
386         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
387           'sources!': [
388             'event_unittest.cc',
389           ],
390         }],
391         ['OS == "android"', {
392           'dependencies': [
393             '../../testing/android/native_test.gyp:native_test_native_code',
394           ],
395         }],
396       ],
397     },
398   ],
399   'conditions': [
400     ['OS == "android"', {
401       'targets': [
402         {
403           'target_name': 'events_unittests_apk',
404           'type': 'none',
405           'dependencies': [
406             'events_unittests',
407           ],
408           'variables': {
409             'test_suite_name': 'events_unittests',
410           },
411           'includes': [ '../../build/apk_test.gypi' ],
412         },
413       ],
414     }],
415     ['test_isolation_mode != "noop"', {
416       'targets': [
417         {
418           'target_name': 'events_unittests_run',
419           'type': 'none',
420           'dependencies': [
421             'events_unittests',
422           ],
423           'includes': [
424             '../../build/isolate.gypi',
425           ],
426           'sources': [
427             'events_unittests.isolate',
428           ],
429           'conditions': [
430             ['use_x11 == 1', {
431               'dependencies': [
432                 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
433               ],
434             }],
435           ],
436         },
437       ],
438     }],
439   ],