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

Unified Diff: chrome/browser/google/google_url_tracker.h

Issue 294193005: Revert of Turn GoogleURLTrackerNavigationHelper(Impl) into a per-tab object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/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
« no previous file with comments | « chrome/browser/google/chrome_google_url_tracker_client.cc ('k') | chrome/browser/google/google_url_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698