OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ | 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ |
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ | 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/message_loop/message_pump_libevent.h" | 10 #include "base/message_loop/message_pump_libevent.h" |
| 11 #include "ui/base/ui_features.h" |
11 #include "ui/events/platform/platform_event_source.h" | 12 #include "ui/events/platform/platform_event_source.h" |
12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/ozone/platform/wayland/wayland_keyboard.h" |
13 #include "ui/ozone/platform/wayland/wayland_object.h" | 15 #include "ui/ozone/platform/wayland/wayland_object.h" |
14 #include "ui/ozone/platform/wayland/wayland_output.h" | 16 #include "ui/ozone/platform/wayland/wayland_output.h" |
15 #include "ui/ozone/platform/wayland/wayland_pointer.h" | 17 #include "ui/ozone/platform/wayland/wayland_pointer.h" |
16 | 18 |
| 19 #if BUILDFLAG(USE_XKBCOMMON) |
| 20 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" |
| 21 #endif |
| 22 |
17 namespace ui { | 23 namespace ui { |
18 | 24 |
19 class WaylandWindow; | 25 class WaylandWindow; |
20 | 26 |
21 class WaylandConnection : public PlatformEventSource, | 27 class WaylandConnection : public PlatformEventSource, |
22 public base::MessagePumpLibevent::Watcher { | 28 public base::MessagePumpLibevent::Watcher { |
23 public: | 29 public: |
24 WaylandConnection(); | 30 WaylandConnection(); |
25 ~WaylandConnection() override; | 31 ~WaylandConnection() override; |
26 | 32 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 std::map<gfx::AcceleratedWidget, WaylandWindow*> window_map_; | 77 std::map<gfx::AcceleratedWidget, WaylandWindow*> window_map_; |
72 | 78 |
73 wl::Object<wl_display> display_; | 79 wl::Object<wl_display> display_; |
74 wl::Object<wl_registry> registry_; | 80 wl::Object<wl_registry> registry_; |
75 wl::Object<wl_compositor> compositor_; | 81 wl::Object<wl_compositor> compositor_; |
76 wl::Object<wl_seat> seat_; | 82 wl::Object<wl_seat> seat_; |
77 wl::Object<wl_shm> shm_; | 83 wl::Object<wl_shm> shm_; |
78 wl::Object<xdg_shell> shell_; | 84 wl::Object<xdg_shell> shell_; |
79 | 85 |
80 std::unique_ptr<WaylandPointer> pointer_; | 86 std::unique_ptr<WaylandPointer> pointer_; |
| 87 std::unique_ptr<WaylandKeyboard> keyboard_; |
81 | 88 |
82 bool scheduled_flush_ = false; | 89 bool scheduled_flush_ = false; |
83 bool watching_ = false; | 90 bool watching_ = false; |
84 base::MessagePumpLibevent::FileDescriptorWatcher controller_; | 91 base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
85 | 92 |
86 std::vector<std::unique_ptr<WaylandOutput>> output_list_; | 93 std::vector<std::unique_ptr<WaylandOutput>> output_list_; |
87 | 94 |
| 95 #if BUILDFLAG(USE_XKBCOMMON) |
| 96 XkbEvdevCodes codes_; |
| 97 #endif |
| 98 |
88 DISALLOW_COPY_AND_ASSIGN(WaylandConnection); | 99 DISALLOW_COPY_AND_ASSIGN(WaylandConnection); |
89 }; | 100 }; |
90 | 101 |
91 } // namespace ui | 102 } // namespace ui |
92 | 103 |
93 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ | 104 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_CONNECTION_H_ |
OLD | NEW |