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

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

Issue 283413002: Turn GoogleURLTrackerNavigationHelper(Impl) into a per-tab object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit 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_navigation_helper.h
diff --git a/chrome/browser/google/google_url_tracker_navigation_helper.h b/chrome/browser/google/google_url_tracker_navigation_helper.h
index 26b7a5348762a03183fa1147e7fcec73aa292250..3f943a8beeb07f0904ca275e25417ed115116ef8 100644
--- a/chrome/browser/google/google_url_tracker_navigation_helper.h
+++ b/chrome/browser/google/google_url_tracker_navigation_helper.h
@@ -6,45 +6,36 @@
#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_
class GoogleURLTracker;
-class InfoBarService;
-class Profile;
-
-namespace content {
-class NavigationController;
-}
// A helper class for GoogleURLTracker that abstracts the details of listening
// for various navigation events.
class GoogleURLTrackerNavigationHelper {
public:
+ GoogleURLTrackerNavigationHelper(GoogleURLTracker* tracker);
Peter Kasting 2014/05/15 21:29:52 Nit: Explicit
blundell 2014/05/16 11:54:18 Done.
virtual ~GoogleURLTrackerNavigationHelper() {}
Peter Kasting 2014/05/15 21:29:52 Nit: Put this destructor definition in the .cc fil
blundell 2014/05/16 11:54:18 Done.
- // Sets the GoogleURLTracker that is associated with this object.
- virtual void SetGoogleURLTracker(GoogleURLTracker* tracker) = 0;
+ // Enables or disables listening for navigation commits.
+ // OnNavigationCommitted will be called for each navigation commit if
+ // listening is enabled.
+ virtual void SetListeningForNavigationCommit(bool listen) = 0;
- // Enables or disables listening for navigation commits for the given
- // NavigationController. OnNavigationCommitted will be called for each
- // navigation commit if listening is enabled.
- virtual void SetListeningForNavigationCommit(
- const content::NavigationController* nav_controller,
- bool listen) = 0;
+ // Returns whether or not this object is currently listening for navigation
+ // commits.
+ virtual bool IsListeningForNavigationCommit() = 0;
- // Returns whether or not the observer is currently listening for navigation
- // commits for the given NavigationController.
- virtual bool IsListeningForNavigationCommit(
- const content::NavigationController* nav_controller) = 0;
+ // Enables or disables listening for tab destruction. OnTabClosed will be
+ // called on tab destruction if listening is enabled.
+ virtual void SetListeningForTabDestruction(bool listen) = 0;
- // Enables or disables listening for tab destruction for the given
- // NavigationController. OnTabClosed will be called on tab destruction if
- // listening is enabled.
- virtual void SetListeningForTabDestruction(
- const content::NavigationController* nav_controller,
- bool listen) = 0;
-
- // Returns whether or not the observer is currently listening for tab
- // destruction for the given NavigationController.
- virtual bool IsListeningForTabDestruction(
- const content::NavigationController* nav_controller) = 0;
+ // Returns whether or not this object is currently listening for tab
+ // destruction.
+ virtual bool IsListeningForTabDestruction() = 0;
+
+ protected:
+ GoogleURLTracker* google_url_tracker() { return tracker_; }
Peter Kasting 2014/05/15 21:29:52 Nit: See comments on other CL regarding accessor/m
blundell 2014/05/16 11:54:18 Done.
+
+ private:
+ GoogleURLTracker* tracker_;
};
Peter Kasting 2014/05/15 21:29:52 Nit: DISALLOW_COPY_AND_ASSIGN
blundell 2014/05/16 11:54:18 Done.
#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698