#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_
#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_
#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 "url/gurl.h"
class GoogleURLTrackerNavigationHelperImpl
: public GoogleURLTrackerNavigationHelper,
public content::NotificationObserver {
public:
explicit GoogleURLTrackerNavigationHelperImpl();
virtual ~GoogleURLTrackerNavigationHelperImpl();
virtual void SetGoogleURLTracker(GoogleURLTracker* tracker) OVERRIDE;
virtual void SetListeningForNavigationStart(bool listen) OVERRIDE;
virtual bool IsListeningForNavigationStart() OVERRIDE;
virtual void SetListeningForNavigationCommit(
const content::NavigationController* nav_controller,
bool listen) OVERRIDE;
virtual bool IsListeningForNavigationCommit(
const content::NavigationController* nav_controller) OVERRIDE;
virtual void SetListeningForTabDestruction(
const content::NavigationController* nav_controller,
bool listen) OVERRIDE;
virtual bool IsListeningForTabDestruction(
const content::NavigationController* nav_controller) OVERRIDE;
private:
friend class GoogleURLTrackerNavigationHelperTest;
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
virtual content::NotificationSource GetWebContentsSource(
const content::NotificationSource& nav_controller_source);
GoogleURLTracker* tracker_;
content::NotificationRegistrar registrar_;
};
#endif