OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//ui/ozone/ozone.gni") |
6 | 7 |
7 assert(use_x11) | 8 assert(use_x11 || ozone_platform_x11) |
8 | 9 |
9 component("x11") { | 10 component("x11") { |
10 output_name = "x11_events_platform" | 11 output_name = "x11_events_platform" |
11 | 12 |
12 sources = [ | 13 sources = [ |
13 "x11_event_source.cc", | 14 "x11_event_source.cc", |
14 "x11_event_source.h", | 15 "x11_event_source.h", |
15 "x11_event_source_glib.cc", | |
16 "x11_event_source_libevent.cc", | |
17 "x11_hotplug_event_handler.cc", | 16 "x11_hotplug_event_handler.cc", |
18 "x11_hotplug_event_handler.h", | 17 "x11_hotplug_event_handler.h", |
19 ] | 18 ] |
20 | 19 |
21 defines = [ "EVENTS_IMPLEMENTATION" ] | 20 defines = [ "EVENTS_IMPLEMENTATION" ] |
22 | 21 |
23 configs += [ "//build/config/linux:x11" ] | 22 configs += [ "//build/config/linux:x11" ] |
24 | 23 |
25 public_deps = [ | 24 public_deps = [ |
26 "//ui/events", | 25 "//ui/events", |
27 "//ui/events:events_base", | 26 "//ui/events:events_base", |
28 "//ui/events/devices", | 27 "//ui/events/devices", |
29 "//ui/events/platform", | 28 "//ui/events/platform", |
| 29 "//ui/events/x", |
30 "//ui/gfx/x", | 30 "//ui/gfx/x", |
31 ] | 31 ] |
32 | 32 |
33 deps = [ | 33 deps = [ |
34 "//base", | 34 "//base", |
35 ] | 35 ] |
36 | 36 |
37 if (is_linux) { | 37 if (use_glib) { |
38 sources -= [ "x11_event_source_libevent.cc" ] | 38 sources += [ |
| 39 "x11_event_source_glib.cc", |
| 40 "x11_event_source_glib.h", |
| 41 ] |
39 | 42 |
40 configs += [ "//build/config/linux:glib" ] | 43 configs += [ "//build/config/linux:glib" ] |
41 } else { | 44 } else { |
42 sources -= [ "x11_event_source_glib.cc" ] | 45 sources += [ |
| 46 "x11_event_source_libevent.cc", |
| 47 "x11_event_source_libevent.h", |
| 48 ] |
43 } | 49 } |
44 } | 50 } |
OLD | NEW |