| Index: ui/ozone/platform/wayland/wayland_display.h
|
| diff --git a/ui/ozone/platform/wayland/wayland_display.h b/ui/ozone/platform/wayland/wayland_display.h
|
| index d63945a8a69050d9af00fc92489600ac0ddede6b..5ddb320efbc67272d73c14fb885874e284f3c588 100644
|
| --- a/ui/ozone/platform/wayland/wayland_display.h
|
| +++ b/ui/ozone/platform/wayland/wayland_display.h
|
| @@ -10,8 +10,10 @@
|
| #include "base/message_loop/message_pump_libevent.h"
|
| #include "ui/events/platform/platform_event_source.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| +#include "ui/ozone/platform/wayland/desktop_platform_screen_delegate.h"
|
| #include "ui/ozone/platform/wayland/wayland_object.h"
|
| #include "ui/ozone/platform/wayland/wayland_pointer.h"
|
| +#include "ui/ozone/platform/wayland/wayland_screen.h"
|
|
|
| namespace ui {
|
|
|
| @@ -23,6 +25,7 @@ class WaylandDisplay : public PlatformEventSource,
|
| WaylandDisplay();
|
| ~WaylandDisplay() override;
|
|
|
| + static WaylandDisplay* GetInstance() { return instance_; }
|
| bool Initialize();
|
| bool StartProcessingEvents();
|
|
|
| @@ -38,6 +41,14 @@ class WaylandDisplay : public PlatformEventSource,
|
| void AddWindow(gfx::AcceleratedWidget widget, WaylandWindow* window);
|
| void RemoveWindow(gfx::AcceleratedWidget widget);
|
|
|
| + const std::vector<WaylandScreen*>& GetScreenList() const;
|
| + WaylandScreen* PrimaryScreen() const { return primary_screen_; }
|
| + void OutputSizeChanged(int32_t name, unsigned width, unsigned height);
|
| + void SetDesktopScreenDelegate(DesktopPlatformScreenDelegate*);
|
| + DesktopPlatformScreenDelegate* GetDesktopScreenDelegate() {
|
| + return desktop_platform_screen_delegate_;
|
| + }
|
| +
|
| private:
|
| void Flush();
|
| void DispatchUiEvent(Event* event);
|
| @@ -65,6 +76,7 @@ class WaylandDisplay : public PlatformEventSource,
|
| static void Ping(void* data, xdg_shell* shell, uint32_t serial);
|
|
|
| std::map<gfx::AcceleratedWidget, WaylandWindow*> window_map_;
|
| + static WaylandDisplay* instance_;
|
|
|
| wl::Object<wl_display> display_;
|
| wl::Object<wl_registry> registry_;
|
| @@ -79,6 +91,10 @@ class WaylandDisplay : public PlatformEventSource,
|
| bool watching_ = false;
|
| base::MessagePumpLibevent::FileDescriptorWatcher controller_;
|
|
|
| + WaylandScreen* primary_screen_;
|
| + std::vector<WaylandScreen*> screen_list_;
|
| +
|
| + DesktopPlatformScreenDelegate* desktop_platform_screen_delegate_;
|
| DISALLOW_COPY_AND_ASSIGN(WaylandDisplay);
|
| };
|
|
|
|
|