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

Unified Diff: ui/ozone/platform/dri/dri_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: 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_window_delegate_proxy.cc ('k') | ui/ozone/platform/dri/dri_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_window_manager.h
diff --git a/ui/ozone/platform/dri/dri_window_manager.h b/ui/ozone/platform/dri/dri_window_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..0cf871815b2856d9077888375bbbd4f36237821e
--- /dev/null
+++ b/ui/ozone/platform/dri/dri_window_manager.h
@@ -0,0 +1,51 @@
+// 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_MANAGER_H_
+#define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
+
+#include <map>
+
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+
+class DriWindowDelegate;
+
+class DriWindowManager {
+ public:
+ DriWindowManager();
+ ~DriWindowManager();
+
+ gfx::AcceleratedWidget NextAcceleratedWidget();
+
+ // Adds a delegate for |widget|. Note: |widget| should not be associated with
+ // a delegate when calling this function.
+ void AddWindowDelegate(gfx::AcceleratedWidget widget,
+ DriWindowDelegate* surface);
+
+ // Removes the delegate for |widget|. Note: |widget| must have a delegate
+ // associated with it when calling this function.
+ void RemoveWindowDelegate(gfx::AcceleratedWidget widget);
+
+ // Returns the delegate associated with |widget|. Note: This function should
+ // be called only if a valid delegate has been associated with |widget|.
+ DriWindowDelegate* GetWindowDelegate(gfx::AcceleratedWidget widget);
+
+ // Check if |widget| has a valid delegate associated with it.
+ bool HasWindowDelegate(gfx::AcceleratedWidget widget);
+
+ private:
+ typedef std::map<gfx::AcceleratedWidget, DriWindowDelegate*>
+ WidgetToDelegateMap;
+
+ WidgetToDelegateMap delegate_map_;
+ gfx::AcceleratedWidget last_allocated_widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(DriWindowManager);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_proxy.cc ('k') | ui/ozone/platform/dri/dri_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698