Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: ui/ozone/platform/wayland/wayland_connection.cc

Issue 2027943002: [WIP] Make content_shell run under Wayland Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (09.28.2016)Rebase on master Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection.h ('k') | ui/ozone/platform/wayland/wayland_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698