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

Unified Diff: chrome/browser/automation/automation_tab_helper.h

Issue 10963061: Switch AutomationTabHelper 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
Index: chrome/browser/automation/automation_tab_helper.h
diff --git a/chrome/browser/automation/automation_tab_helper.h b/chrome/browser/automation/automation_tab_helper.h
index 1085394bf3a2c9c3c6500e3bef1d780a0716c173..0cfcbbfa72984cbec812a243de20de644ce4c35b 100644
--- a/chrome/browser/automation/automation_tab_helper.h
+++ b/chrome/browser/automation/automation_tab_helper.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
class AutomationTabHelper;
@@ -76,9 +77,9 @@ class TabEventObserver {
// from the renderer. Broadcasts tab events to |TabEventObserver|s.
class AutomationTabHelper
: public content::WebContentsObserver,
- public base::SupportsWeakPtr<AutomationTabHelper> {
+ public base::SupportsWeakPtr<AutomationTabHelper>,
+ public WebContentsUserData<AutomationTabHelper> {
public:
- explicit AutomationTabHelper(content::WebContents* web_contents);
virtual ~AutomationTabHelper();
void AddObserver(TabEventObserver* observer);
@@ -97,6 +98,10 @@ class AutomationTabHelper
bool has_pending_loads() const;
private:
+ explicit AutomationTabHelper(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<AutomationTabHelper>;
+
friend class AutomationTabHelperTest;
void OnSnapshotEntirePageACK(
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/automation/automation_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698