Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / events / events.gyp
blobeec7d8d5ed0a86e055235ed7b7a560d5ae1006d7
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/dom4/keycode_converter.cc',
20         'keycodes/dom4/keycode_converter.h',
21         'keycodes/dom4/keycode_converter_data.h',
22       ],
23     },
24     {
25       # GN version: //ui/events:events_base
26       'target_name': 'events_base',
27       'type': '<(component)',
28       'dependencies': [
29         '<(DEPTH)/base/base.gyp:base',
30         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
31         '<(DEPTH)/skia/skia.gyp:skia',
32         '../gfx/gfx.gyp:gfx',
33         '../gfx/gfx.gyp:gfx_geometry',
34         'dom4_keycode_converter',
35       ],
36       'defines': [
37         'EVENTS_BASE_IMPLEMENTATION',
38       ],
39       'sources': [
40         # Note: sources list duplicated in GN build.
41         'device_data_manager.cc',
42         'device_data_manager.h',
43         'event_constants.h',
44         'event_switches.cc',
45         'event_switches.h',
46         'events_base_export.h',
47         'gesture_event_details.cc',
48         'gesture_event_details.h',
49         'gestures/fling_curve.cc',
50         'gestures/fling_curve.h',
51         'gestures/gesture_configuration.cc',
52         'gestures/gesture_configuration.h',
53         'keycodes/keyboard_code_conversion.cc',
54         'keycodes/keyboard_code_conversion.h',
55         'keycodes/keyboard_code_conversion_android.cc',
56         'keycodes/keyboard_code_conversion_android.h',
57         'keycodes/keyboard_code_conversion_mac.h',
58         'keycodes/keyboard_code_conversion_mac.mm',
59         'keycodes/keyboard_code_conversion_win.cc',
60         'keycodes/keyboard_code_conversion_win.h',
61         'keycodes/keyboard_code_conversion_x.cc',
62         'keycodes/keyboard_code_conversion_x.h',
63         'keycodes/keyboard_codes.h',
64         'latency_info.cc',
65         'latency_info.h',
66         'x/device_data_manager_x11.cc',
67         'x/device_data_manager_x11.h',
68         'x/device_list_cache_x.cc',
69         'x/device_list_cache_x.h',
70         'x/keysym_to_unicode.cc',
71         'x/keysym_to_unicode.h',
72         'x/touch_factory_x11.cc',
73         'x/touch_factory_x11.h',
74       ],
75       'export_dependent_settings': [
76         '../../ui/gfx/gfx.gyp:gfx',
77       ],
78       'conditions': [
79         ['use_x11==1', {
80           'dependencies': [
81             '../../build/linux/system.gyp:x11',
82             '../gfx/x/gfx_x11.gyp:gfx_x11',
83           ],
84         }],
85       ],
86     },
87     {
88       # GN version: //ui/events
89       'target_name': 'events',
90       'type': '<(component)',
91       'dependencies': [
92         '<(DEPTH)/base/base.gyp:base',
93         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
94         '<(DEPTH)/skia/skia.gyp:skia',
95         '../gfx/gfx.gyp:gfx',
96         '../gfx/gfx.gyp:gfx_geometry',
97         'events_base',
98         'gesture_detection',
99       ],
100       'defines': [
101         'EVENTS_IMPLEMENTATION',
102       ],
103       'sources': [
104         # Note: sources list duplicated in GN build.
105         'cocoa/cocoa_event_utils.h',
106         'cocoa/cocoa_event_utils.mm',
107         'cocoa/events_mac.mm',
108         'event.cc',
109         'event.h',
110         'event_dispatcher.cc',
111         'event_dispatcher.h',
112         'event_handler.cc',
113         'event_handler.h',
114         'event_processor.cc',
115         'event_processor.h',
116         'event_rewriter.h',
117         'event_source.cc',
118         'event_source.h',
119         'event_target.cc',
120         'event_target.h',
121         'event_target_iterator.h',
122         'event_targeter.cc',
123         'event_targeter.h',
124         'event_utils.cc',
125         'event_utils.h',
126         'events_export.h',
127         'events_stub.cc',
128         'gestures/gesture_provider_aura.cc',
129         'gestures/gesture_provider_aura.h',
130         'gestures/gesture_recognizer.h',
131         'gestures/gesture_recognizer_impl.cc',
132         'gestures/gesture_recognizer_impl.h',
133         'gestures/gesture_recognizer_impl_mac.cc',
134         'gestures/gesture_types.h',
135         'gestures/motion_event_aura.cc',
136         'gestures/motion_event_aura.h',
137         'ozone/events_ozone.cc',
138         'win/events_win.cc',
139         'x/events_x.cc',
140         'linux/text_edit_command_auralinux.cc',
141         'linux/text_edit_command_auralinux.h',
142         'linux/text_edit_key_bindings_delegate_auralinux.cc',
143         'linux/text_edit_key_bindings_delegate_auralinux.h',
144       ],
145       'conditions': [
146         ['use_x11==1', {
147           'dependencies': [
148             '../../build/linux/system.gyp:x11',
149           ],
150         }],
151         ['use_aura==0', {
152           'sources!': [
153             'gestures/gesture_provider_aura.cc',
154             'gestures/gesture_provider_aura.h',
155             'gestures/gesture_recognizer.h',
156             'gestures/gesture_recognizer_impl.cc',
157             'gestures/gesture_recognizer_impl.h',
158             'gestures/gesture_types.h',
159             'gestures/motion_event_aura.cc',
160             'gestures/motion_event_aura.h',
161           ],
162         }],
163         # We explicitly enumerate the platforms we _do_ provide native cracking
164         # for here.
165         ['OS=="win" or OS=="mac" or use_x11==1 or use_ozone==1', {
166           'sources!': [
167             'events_stub.cc',
168           ],
169         }],
170         ['chromeos==1', {
171           'sources!': [
172             'linux/text_edit_command_auralinux.cc',
173             'linux/text_edit_command_auralinux.h',
174             'linux/text_edit_key_bindings_delegate_auralinux.cc',
175             'linux/text_edit_key_bindings_delegate_auralinux.h',
176           ],
177         }],
178       ],
179     },
180     {
181       # GN version: //ui/events:gesture_detection
182       'target_name': 'gesture_detection',
183       'type': '<(component)',
184       'dependencies': [
185         '<(DEPTH)/base/base.gyp:base',
186         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
187         '../gfx/gfx.gyp:gfx',
188         '../gfx/gfx.gyp:gfx_geometry',
189         'events_base',
190       ],
191       'defines': [
192         'GESTURE_DETECTION_IMPLEMENTATION',
193       ],
194       'sources': [
195         # Note: sources list duplicated in GN build.
196         'gesture_detection/bitset_32.h',
197         'gesture_detection/filtered_gesture_provider.cc',
198         'gesture_detection/filtered_gesture_provider.h',
199         'gesture_detection/gesture_config_helper.h',
200         'gesture_detection/gesture_config_helper_android.cc',
201         'gesture_detection/gesture_config_helper_aura.cc',
202         'gesture_detection/gesture_detection_export.h',
203         'gesture_detection/gesture_detector.cc',
204         'gesture_detection/gesture_detector.h',
205         'gesture_detection/gesture_event_data.cc',
206         'gesture_detection/gesture_event_data.h',
207         'gesture_detection/gesture_event_data_packet.cc',
208         'gesture_detection/gesture_event_data_packet.h',
209         'gesture_detection/gesture_provider.cc',
210         'gesture_detection/gesture_provider.h',
211         'gesture_detection/motion_event.cc',
212         'gesture_detection/motion_event.h',
213         'gesture_detection/motion_event_buffer.cc',
214         'gesture_detection/motion_event_buffer.h',
215         'gesture_detection/motion_event_generic.cc',
216         'gesture_detection/motion_event_generic.h',
217         'gesture_detection/scale_gesture_detector.cc',
218         'gesture_detection/scale_gesture_detector.h',
219         'gesture_detection/snap_scroll_controller.cc',
220         'gesture_detection/snap_scroll_controller.h',
221         'gesture_detection/touch_disposition_gesture_filter.cc',
222         'gesture_detection/touch_disposition_gesture_filter.h',
223         'gesture_detection/velocity_tracker_state.cc',
224         'gesture_detection/velocity_tracker_state.h',
225         'gesture_detection/velocity_tracker.cc',
226         'gesture_detection/velocity_tracker.h',
227       ],
228       'conditions': [
229         ['use_aura!=1 and OS!="android"', {
230           'sources': [
231             'gesture_detection/gesture_config_helper.cc',
232           ],
233         }],
234       ],
235     },
236     {
237       # GN version: //ui/events:test_support
238       'target_name': 'events_test_support',
239       'type': 'static_library',
240       'dependencies': [
241         '<(DEPTH)/base/base.gyp:base',
242         '<(DEPTH)/skia/skia.gyp:skia',
243         '../gfx/gfx.gyp:gfx_geometry',
244         'events',
245         'events_base',
246         'gesture_detection',
247         'platform/events_platform.gyp:events_platform',
248       ],
249       'sources': [
250         # Note: sources list duplicated in GN build.
251         'test/cocoa_test_event_utils.h',
252         'test/cocoa_test_event_utils.mm',
253         'test/event_generator.cc',
254         'test/event_generator.h',
255         'test/events_test_utils.cc',
256         'test/events_test_utils.h',
257         'test/events_test_utils_x11.cc',
258         'test/events_test_utils_x11.h',
259         'test/mock_motion_event.cc',
260         'test/mock_motion_event.h',
261         'test/platform_event_waiter.cc',
262         'test/platform_event_waiter.h',
263         'test/test_event_handler.cc',
264         'test/test_event_handler.h',
265         'test/test_event_processor.cc',
266         'test/test_event_processor.h',
267         'test/test_event_target.cc',
268         'test/test_event_target.h',
269       ],
270       'conditions': [
271         ['OS=="ios"', {
272           # The cocoa files don't apply to iOS.
273           'sources/': [['exclude', 'cocoa']],
274         }],
275       ],
276     },
277     {
278       # GN version: //ui/events:events_unittests
279       'target_name': 'events_unittests',
280       'type': '<(gtest_target_type)',
281       'dependencies': [
282         '<(DEPTH)/base/base.gyp:base',
283         '<(DEPTH)/base/base.gyp:run_all_unittests',
284         '<(DEPTH)/base/base.gyp:test_support_base',
285         '<(DEPTH)/skia/skia.gyp:skia',
286         '<(DEPTH)/testing/gtest.gyp:gtest',
287         '../gfx/gfx.gyp:gfx',
288         '../gfx/gfx.gyp:gfx_geometry',
289         '../gfx/gfx.gyp:gfx_test_support',
290         'dom4_keycode_converter',
291         'events',
292         'events_base',
293         'events_test_support',
294         'gesture_detection',
295         'platform/events_platform.gyp:events_platform',
296       ],
297       'sources': [
298         # Note: sources list duplicated in GN build.
299         'cocoa/events_mac_unittest.mm',
300         'event_dispatcher_unittest.cc',
301         'event_processor_unittest.cc',
302         'event_rewriter_unittest.cc',
303         'event_unittest.cc',
304         'gestures/fling_curve_unittest.cc',
305         'gestures/gesture_provider_aura_unittest.cc',
306         'gestures/motion_event_aura_unittest.cc',
307         'gesture_detection/bitset_32_unittest.cc',
308         'gesture_detection/gesture_event_data_packet_unittest.cc',
309         'gesture_detection/gesture_provider_unittest.cc',
310         'gesture_detection/motion_event_buffer_unittest.cc',
311         'gesture_detection/motion_event_generic_unittest.cc',
312         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
313         'gesture_detection/velocity_tracker_unittest.cc',
314         'keycodes/dom4/keycode_converter_unittest.cc',
315         'latency_info_unittest.cc',
316         'platform/platform_event_source_unittest.cc',
317         'x/events_x_unittest.cc',
318       ],
319       'conditions': [
320         ['use_x11==1', {
321           'dependencies': [
322             '../../build/linux/system.gyp:x11',
323             '../gfx/x/gfx_x11.gyp:gfx_x11',
324           ],
325         }],
326         ['use_ozone==1', {
327           'sources': [
328             'ozone/evdev/key_event_converter_evdev_unittest.cc',
329             'ozone/evdev/touch_event_converter_evdev_unittest.cc',
330           ],
331           'dependencies': [
332             'ozone/events_ozone.gyp:events_ozone',
333             'ozone/events_ozone.gyp:events_ozone_evdev',
334           ]
335         }],
336         ['use_aura==0', {
337           'sources!': [
338             'gestures/gesture_provider_aura_unittest.cc',
339             'gestures/motion_event_aura_unittest.cc',
340           ],
341         }],
342         ['OS=="linux" and use_allocator!="none"', {
343           'dependencies': [
344             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
345           ],
346         }],
347         # Exclude tests that rely on event_utils.h for platforms that do not
348         # provide native cracking, i.e., platforms that use events_stub.cc.
349         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
350           'sources!': [
351             'event_unittest.cc',
352           ],
353         }],
354         ['OS == "android"', {
355           'dependencies': [
356             '../../testing/android/native_test.gyp:native_test_native_code',
357           ],
358         }],
359       ],
360     },
361   ],
362   'conditions': [
363     ['OS == "android"', {
364       'targets': [
365         {
366           'target_name': 'events_unittests_apk',
367           'type': 'none',
368           'dependencies': [
369             'events_unittests',
370           ],
371           'variables': {
372             'test_suite_name': 'events_unittests',
373           },
374           'includes': [ '../../build/apk_test.gypi' ],
375         },
376       ],
377     }],
378   ],