Add default implementations for AppWindowRegistry::Observer notifications.
[chromium-blink-merge.git] / ui / events / events.gyp
blobfaf21eeb65c65a96e6b30a9b2d8b711172dda992
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       'target_name': 'dom4_keycode_converter',
12       'type': 'static_library',
13       'dependencies': [
14         '<(DEPTH)/base/base.gyp:base',
15       ],
16       'sources': [
17         'keycodes/dom4/keycode_converter.cc',
18         'keycodes/dom4/keycode_converter.h',
19         'keycodes/dom4/keycode_converter_data.h',
20       ],
21     },
22     {
23       'target_name': 'events_base',
24       'type': '<(component)',
25       'dependencies': [
26         '<(DEPTH)/base/base.gyp:base',
27         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
28         '../gfx/gfx.gyp:gfx',
29         '../gfx/gfx.gyp:gfx_geometry',
30         'dom4_keycode_converter',
31       ],
32       'defines': [
33         'EVENTS_BASE_IMPLEMENTATION',
34       ],
35       'sources': [
36         'event_constants.h',
37         'event_switches.cc',
38         'event_switches.h',
39         'events_base_export.h',
40         'gesture_event_details.cc',
41         'gesture_event_details.h',
42         'keycodes/keyboard_code_conversion.cc',
43         'keycodes/keyboard_code_conversion.h',
44         'keycodes/keyboard_code_conversion_android.cc',
45         'keycodes/keyboard_code_conversion_android.h',
46         'keycodes/keyboard_code_conversion_mac.h',
47         'keycodes/keyboard_code_conversion_mac.mm',
48         'keycodes/keyboard_code_conversion_win.cc',
49         'keycodes/keyboard_code_conversion_win.h',
50         'keycodes/keyboard_code_conversion_x.cc',
51         'keycodes/keyboard_code_conversion_x.h',
52         'keycodes/keyboard_codes.h',
53         'latency_info.cc',
54         'latency_info.h',
55         'x/device_data_manager.cc',
56         'x/device_data_manager.h',
57         'x/device_list_cache_x.cc',
58         'x/device_list_cache_x.h',
59         'x/touch_factory_x11.cc',
60         'x/touch_factory_x11.h',
61       ],
62       'conditions': [
63         ['use_x11==1', {
64           'dependencies': [
65             '../../build/linux/system.gyp:x11',
66             '../gfx/gfx.gyp:gfx_x11',
67           ],
68         }],
69       ],
70     },
71     {
72       'target_name': 'events',
73       'type': '<(component)',
74       'dependencies': [
75         '<(DEPTH)/base/base.gyp:base',
76         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
77         '<(DEPTH)/skia/skia.gyp:skia',
78         '../gfx/gfx.gyp:gfx',
79         '../gfx/gfx.gyp:gfx_geometry',
80         'events_base',
81       ],
82       'defines': [
83         'EVENTS_IMPLEMENTATION',
84       ],
85       'sources': [
86         'cocoa/cocoa_event_utils.h',
87         'cocoa/cocoa_event_utils.mm',
88         'cocoa/events_mac.mm',
89         'event.cc',
90         'event.h',
91         'event_dispatcher.cc',
92         'event_dispatcher.h',
93         'event_handler.cc',
94         'event_handler.h',
95         'event_processor.cc',
96         'event_processor.h',
97         'event_rewriter.h',
98         'event_source.cc',
99         'event_source.h',
100         'event_target.cc',
101         'event_target.h',
102         'event_target_iterator.h',
103         'event_targeter.cc',
104         'event_targeter.h',
105         'event_utils.cc',
106         'event_utils.h',
107         'events_export.h',
108         'events_stub.cc',
109         'gestures/gesture_configuration.cc',
110         'gestures/gesture_configuration.h',
111         'gestures/gesture_point.cc',
112         'gestures/gesture_point.h',
113         'gestures/gesture_recognizer.h',
114         'gestures/gesture_recognizer_impl.cc',
115         'gestures/gesture_recognizer_impl.h',
116         'gestures/gesture_sequence.cc',
117         'gestures/gesture_sequence.h',
118         'gestures/gesture_types.h',
119         'gestures/velocity_calculator.cc',
120         'gestures/velocity_calculator.h',
121         'ozone/device/device_event.cc',
122         'ozone/device/device_event.h',
123         'ozone/device/device_event_observer.h',
124         'ozone/device/device_manager.cc',
125         'ozone/device/device_manager.h',
126         'ozone/device/device_manager_manual.cc',
127         'ozone/device/device_manager_manual.h',
128         'ozone/device/udev/device_manager_udev.cc',
129         'ozone/device/udev/device_manager_udev.h',
130         'ozone/device/udev/scoped_udev.h',
131         'ozone/evdev/libgestures_glue/event_reader_libevdev_cros.cc',
132         'ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h',
133         'ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc',
134         'ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h',
135         'ozone/evdev/libgestures_glue/gesture_logging.cc',
136         'ozone/evdev/libgestures_glue/gesture_logging.h',
137         'ozone/evdev/libgestures_glue/gesture_timer_provider.cc',
138         'ozone/evdev/libgestures_glue/gesture_timer_provider.h',
139         'ozone/evdev/event_converter_evdev.cc',
140         'ozone/evdev/event_converter_evdev.h',
141         'ozone/evdev/event_device_info.cc',
142         'ozone/evdev/event_device_info.h',
143         'ozone/evdev/event_factory_evdev.cc',
144         'ozone/evdev/event_factory_evdev.h',
145         'ozone/evdev/event_modifiers_evdev.cc',
146         'ozone/evdev/event_modifiers_evdev.h',
147         'ozone/evdev/key_event_converter_evdev.cc',
148         'ozone/evdev/key_event_converter_evdev.h',
149         'ozone/evdev/touch_event_converter_evdev.cc',
150         'ozone/evdev/touch_event_converter_evdev.h',
151         'ozone/event_factory_ozone.cc',
152         'ozone/event_factory_ozone.h',
153         'ozone/events_ozone.cc',
154         'platform/platform_event_dispatcher.h',
155         'platform/platform_event_observer.h',
156         'platform/platform_event_source.cc',
157         'platform/platform_event_source.h',
158         'platform/platform_event_source_stub.cc',
159         'platform/platform_event_types.h',
160         'platform/scoped_event_dispatcher.cc',
161         'platform/scoped_event_dispatcher.h',
162         'platform/x11/x11_event_source.cc',
163         'platform/x11/x11_event_source.h',
164         'platform/x11/x11_event_source_glib.cc',
165         'platform/x11/x11_event_source_libevent.cc',
166         'win/events_win.cc',
167         'x/events_x.cc',
168         'linux/text_edit_command_auralinux.cc',
169         'linux/text_edit_command_auralinux.h',
170         'linux/text_edit_key_bindings_delegate_auralinux.cc',
171         'linux/text_edit_key_bindings_delegate_auralinux.h',
172       ],
173       'conditions': [
174         # We explicitly enumerate the platforms we _do_ provide native cracking
175         # for here.
176         ['OS=="win" or OS=="mac" or use_x11==1 or use_ozone==1', {
177           'sources!': [
178             'events_stub.cc',
179           ],
180         }],
181         ['chromeos==1', {
182           'sources!': [
183             'linux/text_edit_command_auralinux.cc',
184             'linux/text_edit_command_auralinux.h',
185             'linux/text_edit_key_bindings_delegate_auralinux.cc',
186             'linux/text_edit_key_bindings_delegate_auralinux.h',
187           ],
188         }],
189         ['use_x11==1', {
190           'sources!': [
191             'platform/platform_event_source_stub.cc',
192           ],
193           'dependencies': [
194             '../../build/linux/system.gyp:x11',
195             '../gfx/gfx.gyp:gfx_x11',
196           ],
197         }],
198         ['use_glib==1', {
199           'dependencies': [
200             '../../build/linux/system.gyp:glib',
201           ],
202           'sources!': [
203             'platform/x11/x11_event_source_libevent.cc',
204           ],
205         }, {
206           # use_glib == 0
207           'sources!': [
208             'platform/x11/x11_event_source_glib.cc',
209           ],
210         }],
211         ['use_ozone_evdev==1', {
212           'defines': ['USE_OZONE_EVDEV=1'],
213         }],
214         ['use_ozone_evdev==1 and use_udev==1', {
215           'dependencies': [
216             '<(DEPTH)/build/linux/system.gyp:udev',
217           ],
218         }],
219         ['use_ozone_evdev==1 and use_evdev_gestures==1', {
220           'dependencies': [
221             '<(DEPTH)/build/linux/system.gyp:libgestures',
222             '<(DEPTH)/build/linux/system.gyp:libevdev-cros',
223           ],
224           'defines': [
225             'USE_EVDEV_GESTURES',
226           ],
227         }, {
228           'sources/': [
229             ['exclude', '^ozone/evdev/libgestures_glue/'],
230           ],
231         }],
232         ['use_udev==0', {
233           'sources/': [
234             ['exclude', '_udev\\.(h|cc)$'],
235           ],
236         }],
237       ],
238     },
239     {
240       'target_name': 'gesture_detection',
241       'type': '<(component)',
242       'dependencies': [
243         '<(DEPTH)/base/base.gyp:base',
244         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
245         '../gfx/gfx.gyp:gfx',
246         '../gfx/gfx.gyp:gfx_geometry',
247         'events_base',
248       ],
249       'defines': [
250         'GESTURE_DETECTION_IMPLEMENTATION',
251       ],
252       'sources': [
253         'gesture_detection/bitset_32.h',
254         'gesture_detection/filtered_gesture_provider.cc',
255         'gesture_detection/filtered_gesture_provider.h',
256         'gesture_detection/gesture_detection_export.h',
257         'gesture_detection/gesture_detector.cc',
258         'gesture_detection/gesture_detector.h',
259         'gesture_detection/gesture_event_data.cc',
260         'gesture_detection/gesture_event_data.h',
261         'gesture_detection/gesture_event_data_packet.cc',
262         'gesture_detection/gesture_event_data_packet.h',
263         'gesture_detection/gesture_config_helper.h',
264         'gesture_detection/gesture_config_helper_aura.cc',
265         'gesture_detection/gesture_config_helper_android.cc',
266         'gesture_detection/gesture_provider.cc',
267         'gesture_detection/gesture_provider.h',
268         'gesture_detection/motion_event.h',
269         'gesture_detection/scale_gesture_detector.cc',
270         'gesture_detection/scale_gesture_detector.h',
271         'gesture_detection/snap_scroll_controller.cc',
272         'gesture_detection/snap_scroll_controller.h',
273         'gesture_detection/touch_disposition_gesture_filter.cc',
274         'gesture_detection/touch_disposition_gesture_filter.h',
275         'gesture_detection/velocity_tracker_state.cc',
276         'gesture_detection/velocity_tracker_state.h',
277         'gesture_detection/velocity_tracker.cc',
278         'gesture_detection/velocity_tracker.h',
279       ],
280       'conditions': [
281         ['use_aura==1', {
282           'dependencies': [
283             'events'
284           ],
285         }],
286         ['use_aura!=1 and OS!="android"', {
287           'sources': [
288             'gesture_detection/gesture_config_helper.cc',
289           ],
290         }],
291       ],
292     },
293     {
294       'target_name': 'events_test_support',
295       'type': 'static_library',
296       'dependencies': [
297         'events',
298         'events_base',
299       ],
300       'sources': [
301         'test/cocoa_test_event_utils.h',
302         'test/cocoa_test_event_utils.mm',
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/platform_event_waiter.cc',
308         'test/platform_event_waiter.h',
309         'test/test_event_handler.cc',
310         'test/test_event_handler.h',
311         'test/test_event_processor.cc',
312         'test/test_event_processor.h',
313         'test/test_event_target.cc',
314         'test/test_event_target.h',
315       ],
316       'conditions': [
317         ['use_x11==1', {
318           'dependencies': [
319             '../../build/linux/system.gyp:x11',
320             '../gfx/gfx.gyp:gfx_x11',
321           ],
322         }],
323         ['OS=="ios"', {
324           # The cocoa files don't apply to iOS.
325           'sources/': [['exclude', 'cocoa']],
326         }],
327       ],
328     },
329     {
330       'target_name': 'events_unittests',
331       'type': '<(gtest_target_type)',
332       'dependencies': [
333         '<(DEPTH)/base/base.gyp:base',
334         '<(DEPTH)/base/base.gyp:run_all_unittests',
335         '<(DEPTH)/base/base.gyp:test_support_base',
336         '<(DEPTH)/testing/gtest.gyp:gtest',
337         '../gfx/gfx.gyp:gfx_geometry',
338         '../gfx/gfx.gyp:gfx_test_support',
339         'dom4_keycode_converter',
340         'events',
341         'events_base',
342         'events_test_support',
343         'gesture_detection'
344       ],
345       'sources': [
346         'cocoa/events_mac_unittest.mm',
347         'event_dispatcher_unittest.cc',
348         'event_processor_unittest.cc',
349         'event_rewriter_unittest.cc',
350         'event_unittest.cc',
351         'gestures/velocity_calculator_unittest.cc',
352         'gesture_detection/bitset_32_unittest.cc',
353         'gesture_detection/gesture_provider_unittest.cc',
354         'gesture_detection/mock_motion_event.h',
355         'gesture_detection/mock_motion_event.cc',
356         'gesture_detection/velocity_tracker_unittest.cc',
357         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
358         'keycodes/dom4/keycode_converter_unittest.cc',
359         'latency_info_unittest.cc',
360         'ozone/evdev/key_event_converter_evdev_unittest.cc',
361         'ozone/evdev/touch_event_converter_evdev_unittest.cc',
362         'platform/platform_event_source_unittest.cc',
363         'x/events_x_unittest.cc',
364       ],
365       'conditions': [
366         ['OS=="linux" and use_allocator!="none"', {
367           'dependencies': [
368             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
369           ],
370         }],
371         # Exclude tests that rely on event_utils.h for platforms that do not
372         # provide native cracking, i.e., platforms that use events_stub.cc.
373         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
374           'sources!': [
375             'event_unittest.cc',
376           ],
377         }],
378         ['OS == "android" and gtest_target_type == "shared_library"', {
379           'dependencies': [
380             '../../testing/android/native_test.gyp:native_test_native_code',
381           ],
382         }],
383       ],
384     },
385   ],
386   'conditions': [
387     # Special target to wrap a gtest_target_type==shared_library
388     # ui_unittests into an android apk for execution.
389     # See base.gyp for TODO(jrg)s about this strategy.
390     ['OS == "android" and gtest_target_type == "shared_library"', {
391       'targets': [
392         {
393           'target_name': 'events_unittests_apk',
394           'type': 'none',
395           'dependencies': [
396             'events_unittests',
397           ],
398           'variables': {
399             'test_suite_name': 'events_unittests',
400           },
401           'includes': [ '../../build/apk_test.gypi' ],
402         },
403       ],
404     }],
405   ],