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

Unified Diff: ui/ozone/platform/dri/native_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: . 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
Index: ui/ozone/platform/dri/native_window_delegate.h
diff --git a/ui/ozone/platform/dri/native_window_delegate.h b/ui/ozone/platform/dri/native_window_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ae8ac22bca5ab862172266709e18f3e97942800
--- /dev/null
+++ b/ui/ozone/platform/dri/native_window_delegate.h
@@ -0,0 +1,39 @@
+// 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_NATIVE_WINDOW_DELEGATE_H_
+#define UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_H_
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Rect;
+} // namespace gfx
+
+namespace ui {
+
+class HardwareDisplayController;
+
+// This is a bridge between the browser process and the GPU process for a native
+// window. Since display configuration is done on the GPU process, it needs to
+// know where the native windows are located such that it can map them to a
+// hardware display controller.
+class NativeWindowDelegate {
+ public:
+ virtual ~NativeWindowDelegate() {}
+
+ // Returns the accelerated widget associated with the delegate.
+ virtual gfx::AcceleratedWidget GetWidget() = 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_NATIVE_WINDOW_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698