| Index: ui/ozone/platform/wayland/wayland_connection.cc
|
| diff --git a/ui/ozone/platform/wayland/wayland_connection.cc b/ui/ozone/platform/wayland/wayland_connection.cc
|
| index b2fb1084f94ac6a7e27b5d4275e834108323d563..7bbc563e78816b09caa6218c14180c9e4b6fe477 100644
|
| --- a/ui/ozone/platform/wayland/wayland_connection.cc
|
| +++ b/ui/ozone/platform/wayland/wayland_connection.cc
|
| @@ -24,7 +24,9 @@ const uint32_t kMaxShmVersion = 1;
|
| const uint32_t kMaxXdgShellVersion = 1;
|
| } // namespace
|
|
|
| -WaylandConnection::WaylandConnection() {}
|
| +WaylandConnection* WaylandConnection::instance_ = nullptr;
|
| +
|
| +WaylandConnection::WaylandConnection() : output_observer_(nullptr) {}
|
|
|
| WaylandConnection::~WaylandConnection() {}
|
|
|
| @@ -65,6 +67,7 @@ bool WaylandConnection::Initialize() {
|
| return false;
|
| }
|
|
|
| + instance_ = this;
|
| return true;
|
| }
|
|
|
| @@ -139,6 +142,17 @@ WaylandConnection::GetOutputList() const {
|
| return output_list_;
|
| }
|
|
|
| +void WaylandConnection::SetOutputObserver(
|
| + OzonePlatformScreenDelegate* observer) {
|
| + output_observer_ = observer;
|
| +}
|
| +
|
| +void WaylandConnection::OnOutputGeometryChanged(int32_t name,
|
| + const gfx::Rect& rect) {
|
| + if (output_observer_)
|
| + output_observer_->OnOutputGeometryChanged(name, rect);
|
| +}
|
| +
|
| // static
|
| void WaylandConnection::Global(void* data,
|
| wl_registry* registry,
|
| @@ -193,7 +207,7 @@ void WaylandConnection::Global(void* data,
|
| NOTIMPLEMENTED() << "Multiple screens support is not implemented";
|
|
|
| connection->output_list_.push_back(
|
| - base::WrapUnique(new WaylandOutput(output.release())));
|
| + base::WrapUnique(new WaylandOutput(output.release(), name)));
|
| }
|
|
|
| connection->ScheduleFlush();
|
|
|