| Index: chrome/browser/google/google_url_tracker.h
|
| diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h
|
| index 5d1d6122feae8a0d8c7b83b13c21e7c865a29eac..5e8ba1aea1d238f3f5b3ee030f81f3225ad850bf 100644
|
| --- a/chrome/browser/google/google_url_tracker.h
|
| +++ b/chrome/browser/google/google_url_tracker.h
|
| @@ -25,6 +25,10 @@
|
| class GoogleURLTrackerNavigationHelper;
|
| class PrefService;
|
| class Profile;
|
| +
|
| +namespace content {
|
| +class NavigationController;
|
| +}
|
|
|
| namespace infobars {
|
| class InfoBar;
|
| @@ -68,6 +72,7 @@
|
| // GoogleURLTrackerFactory::GetForProfile().
|
| GoogleURLTracker(Profile* profile,
|
| scoped_ptr<GoogleURLTrackerClient> client,
|
| + scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper,
|
| Mode mode);
|
|
|
| virtual ~GoogleURLTracker();
|
| @@ -108,14 +113,14 @@
|
|
|
| // Called by the client after SearchCommitted() registers listeners, to
|
| // indicate that we've received the "load now pending" notification.
|
| - // |nav_helper| is the GoogleURLTrackerNavigationHelper associated with this
|
| - // navigation; |infobar_service| is the InfoBarService of the associated tab;
|
| - // and |pending_id| is the unique ID of the newly pending NavigationEntry.
|
| - // If there is already a visible GoogleURLTracker infobar for this tab, this
|
| + // |navigation_controller| is the NavigationController for this load;
|
| + // |infobar_service| is the InfoBarService of the associated tab; and
|
| + // |pending_id| is the unique ID of the newly pending NavigationEntry. If
|
| + // there is already a visible GoogleURLTracker infobar for this tab, this
|
| // function resets its associated pending entry ID to the new ID. Otherwise
|
| // this function creates a map entry for the associated tab.
|
| virtual void OnNavigationPending(
|
| - scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper,
|
| + content::NavigationController* navigation_controller,
|
| InfoBarService* infobar_service,
|
| int pending_id);
|
|
|
| @@ -126,7 +131,8 @@
|
| const GURL& search_url);
|
|
|
| // Called by the navigation observer when a tab closes.
|
| - virtual void OnTabClosed(GoogleURLTrackerNavigationHelper* nav_helper);
|
| + virtual void OnTabClosed(
|
| + content::NavigationController* navigation_controller);
|
|
|
| scoped_ptr<Subscription> RegisterCallback(
|
| const OnGoogleURLUpdatedCallback& cb);
|
| @@ -168,14 +174,14 @@
|
| // Google TLD.
|
| void CloseAllEntries(bool redo_searches);
|
|
|
| - // Unregisters any listeners for the navigation helper in |map_entry|.
|
| + // Unregisters any listeners for the navigation controller in |map_entry|.
|
| // This sanity-DCHECKs that these are registered (or not) in the specific
|
| // cases we expect. (|must_be_listening_for_commit| is used purely for this
|
| // sanity-checking.) This also unregisters the global navigation pending
|
| // listener if there are no remaining listeners for navigation commits, as we
|
| // no longer need them until another search is committed.
|
| void UnregisterForEntrySpecificNotifications(
|
| - GoogleURLTrackerMapEntry* map_entry,
|
| + const GoogleURLTrackerMapEntry& map_entry,
|
| bool must_be_listening_for_commit);
|
|
|
| void NotifyGoogleURLUpdated(GURL old_url, GURL new_url);
|
| @@ -185,6 +191,8 @@
|
| Profile* profile_;
|
|
|
| scoped_ptr<GoogleURLTrackerClient> client_;
|
| +
|
| + scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper_;
|
|
|
| // Creates an infobar and adds it to the provided InfoBarService. Returns the
|
| // infobar on success or NULL on failure. The caller does not own the
|
|
|