Index: chrome/browser/google/google_url_tracker_navigation_helper_impl.h |
diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h |
index b024744df9613b7b79a4307cb1703dad165b5692..ec4168dc2ff175d93f4f16dc4852aca7410fe922 100644 |
--- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h |
+++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h |
@@ -8,40 +8,41 @@ |
#include "chrome/browser/google/google_url_tracker_navigation_helper.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
+#include "content/public/browser/web_contents_user_data.h" |
#include "url/gurl.h" |
class GoogleURLTrackerNavigationHelperImpl |
: public GoogleURLTrackerNavigationHelper, |
- public content::NotificationObserver { |
+ public content::NotificationObserver, |
+ public content::WebContentsUserData< |
+ GoogleURLTrackerNavigationHelperImpl> { |
public: |
- explicit GoogleURLTrackerNavigationHelperImpl(); |
virtual ~GoogleURLTrackerNavigationHelperImpl(); |
- // GoogleURLTrackerNavigationHelper. |
- virtual void SetGoogleURLTracker(GoogleURLTracker* tracker) OVERRIDE; |
+ static void CreateForWebContentsAndTracker(content::WebContents* contents, |
+ GoogleURLTracker* tracker); |
+ |
+ // GoogleURLTrackerNavigationHelper: |
virtual void SetListeningForNavigationCommit( |
- const content::NavigationController* nav_controller, |
bool listen) OVERRIDE; |
- virtual bool IsListeningForNavigationCommit( |
- const content::NavigationController* nav_controller) OVERRIDE; |
+ virtual bool IsListeningForNavigationCommit() OVERRIDE; |
virtual void SetListeningForTabDestruction( |
- const content::NavigationController* nav_controller, |
bool listen) OVERRIDE; |
- virtual bool IsListeningForTabDestruction( |
- const content::NavigationController* nav_controller) OVERRIDE; |
+ virtual bool IsListeningForTabDestruction() OVERRIDE; |
private: |
+ friend class content::WebContentsUserData< |
+ GoogleURLTrackerNavigationHelperImpl>; |
+ |
+ GoogleURLTrackerNavigationHelperImpl(content::WebContents* web_contents, |
+ GoogleURLTracker* tracker); |
+ |
// content::NotificationObserver: |
virtual void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
- // Returns a WebContents NavigationSource for the WebContents corresponding to |
- // the given NavigationController NotificationSource. |
- virtual content::NotificationSource GetWebContentsSource( |
- const content::NotificationSource& nav_controller_source); |
- |
- GoogleURLTracker* tracker_; |
+ content::WebContents* web_contents_; |
content::NotificationRegistrar registrar_; |
}; |
Peter Kasting
2014/05/15 21:29:52
Nit: While here: DISALLOW_COPY_AND_ASSIGN
blundell
2014/05/16 11:54:18
Done.
|