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

Unified Diff: ui/ozone/platform/dri/native_window_manager.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_manager.h
diff --git a/ui/ozone/platform/dri/native_window_manager.h b/ui/ozone/platform/dri/native_window_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..33c846b2529b9a548e74c0260c6f614269b92fd7
--- /dev/null
+++ b/ui/ozone/platform/dri/native_window_manager.h
@@ -0,0 +1,38 @@
+// 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_MANAGER_H_
+#define UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_MANAGER_H_
+
+#include <map>
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+
+class NativeWindowDelegate;
+
+class NativeWindowManager {
+ public:
+ NativeWindowManager();
+ ~NativeWindowManager();
+
+ gfx::AcceleratedWidget AllocateAcceleratedWidget();
+
+ void AddNativeWindowDelegate(gfx::AcceleratedWidget widget,
+ NativeWindowDelegate* surface);
+ void RemoveNativeWindowDelegate(gfx::AcceleratedWidget widget);
+ NativeWindowDelegate* GetNativeWindowDelegate(gfx::AcceleratedWidget widget);
+ bool HasNativeWindowDelegate(gfx::AcceleratedWidget widget);
+
+ private:
+ std::map<gfx::AcceleratedWidget, NativeWindowDelegate*> delegate_map_;
alexst (slow to review) 2014/08/18 17:43:47 Please typedef the map to something like WidgetToD
dnicoara 2014/08/18 18:55:24 Done.
+ gfx::AcceleratedWidget allocated_widgets_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeWindowManager);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698