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

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

Issue 479713002: [Ozone-GBM] Adding NativeWindowDelegate to IPC window changes to the GPU (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix name Created 6 years, 4 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
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_proxy.h ('k') | ui/ozone/platform/dri/dri_window_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_window_delegate_proxy.cc
diff --git a/ui/ozone/platform/dri/dri_window_delegate_proxy.cc b/ui/ozone/platform/dri/dri_window_delegate_proxy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..297bbd7fd1973fb0908c897fcce7c701af60db7a
--- /dev/null
+++ b/ui/ozone/platform/dri/dri_window_delegate_proxy.cc
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/ozone/platform/dri/dri_window_delegate_proxy.h"
+
+#include "ui/ozone/common/gpu/ozone_gpu_messages.h"
+#include "ui/ozone/platform/dri/gpu_platform_support_host_gbm.h"
+
+namespace ui {
+
+DriWindowDelegateProxy::DriWindowDelegateProxy(
+ gfx::AcceleratedWidget widget,
+ GpuPlatformSupportHostGbm* sender)
+ : widget_(widget), sender_(sender) {
+}
+
+DriWindowDelegateProxy::~DriWindowDelegateProxy() {
+}
+
+void DriWindowDelegateProxy::Initialize() {
+ bool status = sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_));
+ DCHECK(status);
+}
+
+void DriWindowDelegateProxy::Shutdown() {
+ bool status = sender_->Send(new OzoneGpuMsg_DestroyWindowDelegate(widget_));
+ DCHECK(status);
+}
+
+gfx::AcceleratedWidget DriWindowDelegateProxy::GetAcceleratedWidget() {
+ return widget_;
+}
+
+HardwareDisplayController* DriWindowDelegateProxy::GetController() {
+ NOTREACHED();
+ return NULL;
+}
+
+void DriWindowDelegateProxy::OnBoundsChanged(const gfx::Rect& bounds) {
+ bool status =
+ sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds));
+ DCHECK(status);
+}
+
+} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_proxy.h ('k') | ui/ozone/platform/dri/dri_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698