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

Unified Diff: chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h

Issue 11030004: Switch TabContentsSyncedTabDelegate to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dtor check Created 8 years, 2 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: chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
diff --git a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
index 51ddf7e73eff8f8eb93b26d6606fd921a14f9889..e7a60bb23c3f81f697b003439777394afbf70733 100644
--- a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
+++ b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
@@ -6,15 +6,18 @@
#define CHROME_BROWSER_UI_SYNC_TAB_CONTENTS_SYNCED_TAB_DELEGATE_H_
#include "base/compiler_specific.h"
+#include "chrome/browser/common/web_contents_user_data.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/sync/glue/synced_tab_delegate.h"
-class TabContents;
+namespace content {
+class WebContents;
+}
class TabContentsSyncedTabDelegate
- : public browser_sync::SyncedTabDelegate {
+ : public browser_sync::SyncedTabDelegate,
+ public WebContentsUserData<TabContentsSyncedTabDelegate> {
public:
- explicit TabContentsSyncedTabDelegate(TabContents* tab_contents);
virtual ~TabContentsSyncedTabDelegate();
// Methods from SyncedTabDelegate.
@@ -32,7 +35,10 @@ class TabContentsSyncedTabDelegate
virtual bool IsPinned() const OVERRIDE;
private:
- TabContents* tab_contents_;
+ explicit TabContentsSyncedTabDelegate(content::WebContents* web_contents);
+ friend class WebContentsUserData<TabContentsSyncedTabDelegate>;
+
+ content::WebContents* web_contents_;
DISALLOW_COPY_AND_ASSIGN(TabContentsSyncedTabDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698