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

Unified Diff: ui/ozone/platform/dri/native_window_delegate_impl.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_impl.h
diff --git a/ui/ozone/platform/dri/native_window_delegate_impl.h b/ui/ozone/platform/dri/native_window_delegate_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e8f551514d0af400d1b368c5b50c5c900d4dcb2
--- /dev/null
+++ b/ui/ozone/platform/dri/native_window_delegate_impl.h
@@ -0,0 +1,47 @@
+// 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_IMPL_H_
+#define UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_IMPL_H_
+
+#include "base/memory/weak_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/ozone/platform/dri/native_window_delegate.h"
+
+namespace gfx {
+class Rect;
+} // namespace gfx
+
+namespace ui {
+
+class HardwareDisplayController;
+class NativeWindowManager;
+class ScreenManager;
+
+class NativeWindowDelegateImpl : public NativeWindowDelegate {
+ public:
+ NativeWindowDelegateImpl(gfx::AcceleratedWidget widget,
+ NativeWindowManager* window_manager,
+ ScreenManager* screen_manager);
+ virtual ~NativeWindowDelegateImpl();
+
+ // NativeWindowDelegate:
+ virtual gfx::AcceleratedWidget GetWidget() OVERRIDE;
+ virtual HardwareDisplayController* GetController() OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE;
+
+ private:
+ gfx::AcceleratedWidget widget_;
+
+ NativeWindowManager* window_manager_; // Not owned.
+ ScreenManager* screen_manager_; // Not owned.
+
+ base::WeakPtr<HardwareDisplayController> controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeWindowDelegateImpl);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698