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