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_ |