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

Unified Diff: ui/ozone/platform/dri/gpu_platform_support_gbm.cc

Issue 377753002: [Ozone-GBM] Add basic support for display configuration over IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/dri/gpu_platform_support_gbm.cc
diff --git a/ui/ozone/platform/dri/gpu_platform_support_gbm.cc b/ui/ozone/platform/dri/gpu_platform_support_gbm.cc
index 70c99f4d2ff782c8badb7975109605460e77c2b0..051538e3b8d0900e07e8e055b1a3fad3a8237fee 100644
--- a/ui/ozone/platform/dri/gpu_platform_support_gbm.cc
+++ b/ui/ozone/platform/dri/gpu_platform_support_gbm.cc
@@ -14,8 +14,17 @@ GpuPlatformSupportGbm::GpuPlatformSupportGbm(DriSurfaceFactory* dri)
: sender_(NULL), dri_(dri) {
}
+GpuPlatformSupportGbm::~GpuPlatformSupportGbm() {}
+
+void GpuPlatformSupportGbm::AddHandler(scoped_ptr<GpuPlatformSupport> handler) {
+ handlers_.push_back(handler.release());
+}
+
void GpuPlatformSupportGbm::OnChannelEstablished(IPC::Sender* sender) {
sender_ = sender;
+
+ for (size_t i = 0; i < handlers_.size(); ++i)
+ handlers_[i]->OnChannelEstablished(sender);
}
bool GpuPlatformSupportGbm::OnMessageReceived(const IPC::Message& message) {
@@ -27,7 +36,12 @@ bool GpuPlatformSupportGbm::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_UNHANDLED(handled = false);
IPC_END_MESSAGE_MAP()
- return handled;
+ if (!handled)
+ for (size_t i = 0; i < handlers_.size(); ++i)
+ if (handlers_[i]->OnMessageReceived(message))
+ return true;
+
+ return false;
}
void GpuPlatformSupportGbm::OnCursorSet(gfx::AcceleratedWidget widget,

Powered by Google App Engine
This is Rietveld 408576698