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

Unified Diff: ui/ozone/platform/dri/dri_window_manager.h

Issue 469343003: [Ozone-GBM] Pumb DriWindowDelegate throughout the platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest && rebase 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.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
index 0cf871815b2856d9077888375bbbd4f36237821e..7589530fab6fb76288311318e7cf318db5999fc5 100644
--- a/ui/ozone/platform/dri/dri_window_manager.h
+++ b/ui/ozone/platform/dri/dri_window_manager.h
@@ -5,8 +5,7 @@
#ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
#define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
-#include <map>
-
+#include "base/containers/scoped_ptr_hash_map.h"
#include "ui/gfx/native_widget_types.h"
namespace ui {
@@ -23,11 +22,12 @@ class DriWindowManager {
// 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);
+ scoped_ptr<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);
+ scoped_ptr<DriWindowDelegate> 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|.
@@ -37,7 +37,7 @@ class DriWindowManager {
bool HasWindowDelegate(gfx::AcceleratedWidget widget);
private:
- typedef std::map<gfx::AcceleratedWidget, DriWindowDelegate*>
+ typedef base::ScopedPtrHashMap<gfx::AcceleratedWidget, DriWindowDelegate>
WidgetToDelegateMap;
WidgetToDelegateMap delegate_map_;
« no previous file with comments | « ui/ozone/platform/dri/dri_window.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