cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ui / events / ozone / BUILD.gn
blob568663b18d252c3db737f535ff0b102c70b4b404
1 # Copyright 2014 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.
5 import("//build/config/features.gni")
6 import("//build/config/linux/pkg_config.gni")
7 import("//build/config/ui.gni")
9 declare_args() {
10   # Optional system libraries.
11   use_xkbcommon = false
13   # Support ChromeOS touchpad gestures with ozone.
14   use_evdev_gestures = false
17 if (use_xkbcommon) {
18   pkg_config("xkbcommon") {
19     packages = [ "xkbcommon" ]
20   }
23 component("events_ozone") {
24   sources = [
25     "chromeos/cursor_controller.cc",
26     "chromeos/cursor_controller.h",
27     "device/device_event.cc",
28     "device/device_event.h",
29     "device/device_event_observer.h",
30     "device/device_manager.cc",
31     "device/device_manager.h",
32     "device/device_manager_manual.cc",
33     "device/device_manager_manual.h",
34     "device/udev/device_manager_udev.cc",
35     "device/udev/device_manager_udev.h",
36     "events_ozone_export.h",
37   ]
39   deps = [
40     "//base",
41     "//base/third_party/dynamic_annotations",
42     "//ui/events",
43     "//ui/events:events_base",
44   ]
46   defines = [ "EVENTS_OZONE_IMPLEMENTATION" ]
48   if (!use_udev) {
49     sources -= [
50       "device/udev/device_manager_udev.cc",
51       "device/udev/device_manager_udev.h",
52     ]
53   }
55   if (use_ozone && use_udev) {
56     deps += [ "//device/udev_linux" ]
57   }
60 config("evdev") {
61   defines = [ "USE_EVDEV" ]
64 config("evdev_gestures") {
65   defines = [ "USE_EVDEV_GESTURES" ]
68 if (use_evdev_gestures) {
69   pkg_config("libevdev-cros") {
70     packages = [ "libevdev-cros" ]
71   }
73   pkg_config("libgestures") {
74     packages = [ "libgestures" ]
75   }
78 component("events_ozone_evdev") {
79   sources = [
80     "evdev/device_event_dispatcher_evdev.cc",
81     "evdev/device_event_dispatcher_evdev.h",
82     "evdev/event_converter_evdev.cc",
83     "evdev/event_converter_evdev.h",
84     "evdev/event_converter_evdev_impl.cc",
85     "evdev/event_converter_evdev_impl.h",
86     "evdev/event_device_info.cc",
87     "evdev/event_device_info.h",
88     "evdev/event_factory_evdev.cc",
89     "evdev/event_factory_evdev.h",
90     "evdev/event_modifiers_evdev.cc",
91     "evdev/event_modifiers_evdev.h",
92     "evdev/event_thread_evdev.cc",
93     "evdev/event_thread_evdev.h",
94     "evdev/events_ozone_evdev_export.h",
95     "evdev/input_controller_evdev.cc",
96     "evdev/input_controller_evdev.h",
97     "evdev/input_device_factory_evdev.cc",
98     "evdev/input_device_factory_evdev.h",
99     "evdev/input_device_factory_evdev_proxy.cc",
100     "evdev/input_device_factory_evdev_proxy.h",
101     "evdev/input_device_settings_evdev.cc",
102     "evdev/input_device_settings_evdev.h",
103     "evdev/input_injector_evdev.cc",
104     "evdev/input_injector_evdev.h",
105     "evdev/keyboard_evdev.cc",
106     "evdev/keyboard_evdev.h",
107     "evdev/keyboard_util_evdev.cc",
108     "evdev/keyboard_util_evdev.h",
109     "evdev/mouse_button_map_evdev.cc",
110     "evdev/mouse_button_map_evdev.h",
111     "evdev/tablet_event_converter_evdev.cc",
112     "evdev/tablet_event_converter_evdev.h",
113     "evdev/touch_evdev_debug_buffer.cc",
114     "evdev/touch_evdev_debug_buffer.h",
115     "evdev/touch_evdev_types.cc",
116     "evdev/touch_evdev_types.h",
117     "evdev/touch_event_converter_evdev.cc",
118     "evdev/touch_event_converter_evdev.h",
119     "evdev/touch_noise/far_apart_taps_touch_noise_filter.cc",
120     "evdev/touch_noise/far_apart_taps_touch_noise_filter.h",
121     "evdev/touch_noise/horizontally_aligned_touch_noise_filter.cc",
122     "evdev/touch_noise/horizontally_aligned_touch_noise_filter.h",
123     "evdev/touch_noise/single_position_touch_noise_filter.cc",
124     "evdev/touch_noise/single_position_touch_noise_filter.h",
125     "evdev/touch_noise/touch_noise_filter.h",
126     "evdev/touch_noise/touch_noise_finder.cc",
127     "evdev/touch_noise/touch_noise_finder.h",
128   ]
130   defines = [ "EVENTS_OZONE_EVDEV_IMPLEMENTATION" ]
132   deps = [
133     ":events_ozone",
134     ":events_ozone_layout",
135     "//base",
136     "//ui/events",
137     "//ui/events:dom_keycode_converter",
138     "//ui/events:events_base",
139     "//ui/events/devices",
140     "//ui/events/platform",
141     "//ui/gfx",
142   ]
144   public_configs = [ ":evdev" ]
146   if (use_ozone && use_evdev_gestures) {
147     sources += [
148       "evdev/libgestures_glue/event_reader_libevdev_cros.cc",
149       "evdev/libgestures_glue/event_reader_libevdev_cros.h",
150       "evdev/libgestures_glue/gesture_feedback.cc",
151       "evdev/libgestures_glue/gesture_feedback.h",
152       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc",
153       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h",
154       "evdev/libgestures_glue/gesture_logging.cc",
155       "evdev/libgestures_glue/gesture_logging.h",
156       "evdev/libgestures_glue/gesture_property_provider.cc",
157       "evdev/libgestures_glue/gesture_property_provider.h",
158       "evdev/libgestures_glue/gesture_timer_provider.cc",
159       "evdev/libgestures_glue/gesture_timer_provider.h",
160     ]
162     public_configs += [ ":evdev_gestures" ]
164     configs += [
165       ":libevdev-cros",
166       ":libgestures",
167     ]
168   }
171 config("events_ozone_layout_config") {
172   if (use_xkbcommon) {
173     defines = [ "USE_XKBCOMMON" ]
174   }
177 component("events_ozone_layout") {
178   sources = [
179     "layout/events_ozone_layout_export.h",
180     "layout/keyboard_layout_engine.h",
181     "layout/keyboard_layout_engine_manager.cc",
182     "layout/keyboard_layout_engine_manager.h",
183     "layout/layout_util.cc",
184     "layout/layout_util.h",
185     "layout/no/no_keyboard_layout_engine.cc",
186     "layout/no/no_keyboard_layout_engine.h",
187     "layout/stub/stub_keyboard_layout_engine.cc",
188     "layout/stub/stub_keyboard_layout_engine.h",
189   ]
191   defines = [ "EVENTS_OZONE_LAYOUT_IMPLEMENTATION" ]
193   deps = [
194     "//base",
195     "//ui/events:dom_keycode_converter",
196     "//ui/events:events_base",
197   ]
199   public_configs = [ ":events_ozone_layout_config" ]
201   if (use_xkbcommon) {
202     configs += [ ":xkbcommon" ]
204     sources += [
205       "layout/xkb/scoped_xkb.h",
206       "layout/xkb/xkb.h",
207       "layout/xkb/xkb_evdev_codes.cc",
208       "layout/xkb/xkb_evdev_codes.h",
209       "layout/xkb/xkb_key_code_converter.h",
210       "layout/xkb/xkb_keyboard_layout_engine.cc",
211       "layout/xkb/xkb_keyboard_layout_engine.h",
212       "layout/xkb/xkb_keysym.h",
213     ]
214   }