Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / events / ozone / BUILD.gn
blob5a1282f3a54b8af075056207ff137160bfc2374f
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
14 if (use_xkbcommon) {
15   pkg_config("xkbcommon") {
16     packages = [ "xkbcommon" ]
17   }
20 component("events_ozone") {
21   sources = [
22     "chromeos/cursor_controller.cc",
23     "chromeos/cursor_controller.h",
24     "device/device_event.cc",
25     "device/device_event.h",
26     "device/device_event_observer.h",
27     "device/device_manager.cc",
28     "device/device_manager.h",
29     "device/device_manager_manual.cc",
30     "device/device_manager_manual.h",
31     "device/udev/device_manager_udev.cc",
32     "device/udev/device_manager_udev.h",
33     "events_ozone_export.h",
34   ]
36   deps = [
37     "//base",
38     "//base/third_party/dynamic_annotations",
39     "//ui/events",
40     "//ui/events:events_base",
41   ]
43   defines = [ "EVENTS_OZONE_IMPLEMENTATION" ]
45   if (!use_udev) {
46     sources -= [
47       "device/udev/device_manager_udev.cc",
48       "device/udev/device_manager_udev.h",
49     ]
50   }
52   if (use_ozone_evdev && use_udev) {
53     deps += [ "//device/udev_linux" ]
54   }
57 config("evdev") {
58   defines = [ "USE_EVDEV" ]
61 config("evdev_gestures") {
62   defines = [ "USE_EVDEV_GESTURES" ]
65 component("events_ozone_evdev") {
66   sources = [
67     "evdev/device_event_dispatcher_evdev.cc",
68     "evdev/device_event_dispatcher_evdev.h",
69     "evdev/event_converter_evdev.cc",
70     "evdev/event_converter_evdev.h",
71     "evdev/event_converter_evdev_impl.cc",
72     "evdev/event_converter_evdev_impl.h",
73     "evdev/event_device_info.cc",
74     "evdev/event_device_info.h",
75     "evdev/event_factory_evdev.cc",
76     "evdev/event_factory_evdev.h",
77     "evdev/event_modifiers_evdev.cc",
78     "evdev/event_modifiers_evdev.h",
79     "evdev/event_thread_evdev.cc",
80     "evdev/event_thread_evdev.h",
81     "evdev/events_ozone_evdev_export.h",
82     "evdev/input_controller_evdev.cc",
83     "evdev/input_controller_evdev.h",
84     "evdev/input_device_factory_evdev.cc",
85     "evdev/input_device_factory_evdev.h",
86     "evdev/input_device_factory_evdev_proxy.cc",
87     "evdev/input_device_factory_evdev_proxy.h",
88     "evdev/input_device_settings_evdev.cc",
89     "evdev/input_device_settings_evdev.h",
90     "evdev/input_injector_evdev.cc",
91     "evdev/input_injector_evdev.h",
92     "evdev/keyboard_evdev.cc",
93     "evdev/keyboard_evdev.h",
94     "evdev/keyboard_util_evdev.cc",
95     "evdev/keyboard_util_evdev.h",
96     "evdev/mouse_button_map_evdev.cc",
97     "evdev/mouse_button_map_evdev.h",
98     "evdev/tablet_event_converter_evdev.cc",
99     "evdev/tablet_event_converter_evdev.h",
100     "evdev/touch_event_converter_evdev.cc",
101     "evdev/touch_event_converter_evdev.h",
102   ]
104   defines = [ "EVENTS_OZONE_EVDEV_IMPLEMENTATION" ]
106   deps = [
107     ":events_ozone",
108     ":events_ozone_layout",
109     "//base",
110     "//ui/events",
111     "//ui/events:dom4_keycode_converter",
112     "//ui/events:events_base",
113     "//ui/events/devices",
114     "//ui/events/platform",
115     "//ui/gfx",
116   ]
118   public_configs = [ ":evdev" ]
120   if (use_ozone_evdev && use_evdev_gestures) {
121     sources += [
122       "evdev/libgestures_glue/event_reader_libevdev_cros.cc",
123       "evdev/libgestures_glue/event_reader_libevdev_cros.h",
124       "evdev/libgestures_glue/gesture_feedback.cc",
125       "evdev/libgestures_glue/gesture_feedback.h",
126       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc",
127       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h",
128       "evdev/libgestures_glue/gesture_logging.cc",
129       "evdev/libgestures_glue/gesture_logging.h",
130       "evdev/libgestures_glue/gesture_property_provider.cc",
131       "evdev/libgestures_glue/gesture_property_provider.h",
132       "evdev/libgestures_glue/gesture_timer_provider.cc",
133       "evdev/libgestures_glue/gesture_timer_provider.h",
134     ]
136     public_configs += [ ":evdev_gestures" ]
138     configs += [
139       "//build/config/linux:libevdev-cros",
140       "//build/config/linux:libgestures",
141     ]
142   }
145 config("events_ozone_layout_config") {
146   if (use_xkbcommon) {
147     defines = [ "USE_XKBCOMMON" ]
148   }
151 component("events_ozone_layout") {
152   sources = [
153     "layout/events_ozone_layout_export.h",
154     "layout/keyboard_layout_engine.h",
155     "layout/keyboard_layout_engine_manager.cc",
156     "layout/keyboard_layout_engine_manager.h",
157     "layout/layout_util.cc",
158     "layout/layout_util.h",
159     "layout/no/no_keyboard_layout_engine.cc",
160     "layout/no/no_keyboard_layout_engine.h",
161     "layout/stub/stub_keyboard_layout_engine.cc",
162     "layout/stub/stub_keyboard_layout_engine.h",
163   ]
165   defines = [ "EVENTS_OZONE_LAYOUT_IMPLEMENTATION" ]
167   deps = [
168     "//base",
169     "//ui/events:dom4_keycode_converter",
170     "//ui/events:events_base",
171   ]
173   public_configs = [ ":events_ozone_layout_config" ]
175   if (use_xkbcommon) {
176     configs += [ ":xkbcommon" ]
178     sources += [
179       "layout/xkb/scoped_xkb.h",
180       "layout/xkb/xkb.h",
181       "layout/xkb/xkb_evdev_codes.cc",
182       "layout/xkb/xkb_evdev_codes.h",
183       "layout/xkb/xkb_key_code_converter.h",
184       "layout/xkb/xkb_keyboard_code_conversion.cc",
185       "layout/xkb/xkb_keyboard_code_conversion.h",
186       "layout/xkb/xkb_keyboard_layout_engine.cc",
187       "layout/xkb/xkb_keyboard_layout_engine.h",
188       "layout/xkb/xkb_keysym.h",
189     ]
190   }