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

Unified Diff: chrome/browser/ui/tab_contents/core_tab_helper.h

Issue 10905301: Switch CoreTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | « chrome/browser/ui/browser_adoption.cc ('k') | chrome/browser/ui/tab_contents/core_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_contents/core_tab_helper.h
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.h b/chrome/browser/ui/tab_contents/core_tab_helper.h
index ac90ebae4cd8919d2f1c016518cb020ac0dabaa3..9be7b80bb07cc49bd9bc5eb72a2dec1cb8bc7450 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.h
@@ -5,14 +5,15 @@
#ifndef CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
#define CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
class CoreTabHelperDelegate;
// Per-tab class to handle functionality that is core to the operation of tabs.
-class CoreTabHelper : public content::WebContentsObserver {
+class CoreTabHelper : public content::WebContentsObserver,
+ public WebContentsUserData<CoreTabHelper> {
public:
- explicit CoreTabHelper(content::WebContents* web_contents);
virtual ~CoreTabHelper();
CoreTabHelperDelegate* delegate() const { return delegate_; }
@@ -25,6 +26,10 @@ class CoreTabHelper : public content::WebContentsObserver {
string16 GetStatusText() const;
private:
+ explicit CoreTabHelper(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<CoreTabHelper>;
+
// content::WebContentsObserver overrides:
virtual void WasShown() OVERRIDE;
« no previous file with comments | « chrome/browser/ui/browser_adoption.cc ('k') | chrome/browser/ui/tab_contents/core_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698