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

Unified Diff: ui/ozone/platform/dri/dri_window_delegate.h

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.gypi ('k') | ui/ozone/platform/dri/dri_window_delegate_impl.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.h
diff --git a/ui/ozone/platform/dri/dri_window_delegate.h b/ui/ozone/platform/dri/dri_window_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..2787e2cdf8ea24c37ab5fc73093d6e7b5df3ad10
--- /dev/null
+++ b/ui/ozone/platform/dri/dri_window_delegate.h
@@ -0,0 +1,52 @@
+// 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.
+
+#ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_H_
+#define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_H_
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Rect;
+} // namespace gfx
+
+namespace ui {
+
+class HardwareDisplayController;
+
+// Interface for the display-server half of a DriWindow.
+//
+// The main implementation of this lives in the process that owns the display
+// connection (usually the GPU process) and associates a platform window
+// (DriWindow) with a display. A window is associated with the display whose
+// bounds contains the window bounds. If there's no suitable display, the window
+// is disconnected and its contents will not be visible.
+//
+// In software mode, this is owned directly on DriWindow because the display
+// controller object is in the same process.
+//
+// In accelerated mode, there's a proxy implementation and calls are forwarded
+// to the real object in the GPU process via IPC.
+class DriWindowDelegate {
+ public:
+ virtual ~DriWindowDelegate() {}
+
+ virtual void Initialize() = 0;
+
+ virtual void Shutdown() = 0;
+
+ // Returns the accelerated widget associated with the delegate.
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
+
+ // Returns the current controller the window is displaying on. Callers should
+ // not cache the result as the controller may change as the window is moved.
+ virtual HardwareDisplayController* GetController() = 0;
+
+ // Called when the window is resized/moved.
+ virtual void OnBoundsChanged(const gfx::Rect& bounds) = 0;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_H_
« no previous file with comments | « ui/ozone/platform/dri/dri.gypi ('k') | ui/ozone/platform/dri/dri_window_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698