Index: ui/ozone/platform/wayland/wayland_connection.h |
diff --git a/ui/ozone/platform/wayland/wayland_connection.h b/ui/ozone/platform/wayland/wayland_connection.h |
index 8f837b586e4b993b7d3a5bdf31a6eca19a2c26ed..abc341b6da24761785c0038ecca3f503acc36dce 100644 |
--- a/ui/ozone/platform/wayland/wayland_connection.h |
+++ b/ui/ozone/platform/wayland/wayland_connection.h |
@@ -13,6 +13,7 @@ |
#include "ui/ozone/platform/wayland/wayland_object.h" |
#include "ui/ozone/platform/wayland/wayland_output.h" |
#include "ui/ozone/platform/wayland/wayland_pointer.h" |
+#include "ui/ozone/public/ozone_platform_screen_delegate.h" |
namespace ui { |
@@ -26,6 +27,7 @@ class WaylandConnection : public PlatformEventSource, |
bool Initialize(); |
bool StartProcessingEvents(); |
+ static WaylandConnection* GetInstance() { return instance_; } |
// Schedules a flush of the Wayland connection. |
void ScheduleFlush(); |
@@ -41,6 +43,8 @@ class WaylandConnection : public PlatformEventSource, |
const std::vector<std::unique_ptr<WaylandOutput>>& GetOutputList() const; |
WaylandOutput* PrimaryOutput() const; |
+ void SetOutputObserver(OzonePlatformScreenDelegate*); |
+ void OnOutputGeometryChanged(int32_t name, const gfx::Rect&); |
private: |
void Flush(); |
@@ -69,6 +73,7 @@ class WaylandConnection : public PlatformEventSource, |
static void Ping(void* data, xdg_shell* shell, uint32_t serial); |
std::map<gfx::AcceleratedWidget, WaylandWindow*> window_map_; |
+ static WaylandConnection* instance_; |
wl::Object<wl_display> display_; |
wl::Object<wl_registry> registry_; |
@@ -84,6 +89,7 @@ class WaylandConnection : public PlatformEventSource, |
base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
std::vector<std::unique_ptr<WaylandOutput>> output_list_; |
+ OzonePlatformScreenDelegate* output_observer_; |
DISALLOW_COPY_AND_ASSIGN(WaylandConnection); |
}; |