Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / google / google_url_tracker_navigation_helper.h
blobf48e6f0974c56cf7943af6f798001ae528c7c8cd
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_
8 class GoogleURLTracker;
9 class InfoBarService;
10 class Profile;
12 namespace content {
13 class NavigationController;
16 // A helper class for GoogleURLTracker that abstracts the details of listening
17 // for various navigation events.
18 class GoogleURLTrackerNavigationHelper {
19 public:
20 virtual ~GoogleURLTrackerNavigationHelper() {}
22 // Sets the GoogleURLTracker that should receive callbacks from this observer.
23 virtual void SetGoogleURLTracker(GoogleURLTracker* tracker) = 0;
25 // Enables or disables listening for navigation starts. OnNavigationPending
26 // will be called for each navigation start if listening is enabled.
27 virtual void SetListeningForNavigationStart(bool listen) = 0;
29 // Returns whether or not the observer is currently listening for navigation
30 // starts.
31 virtual bool IsListeningForNavigationStart() = 0;
33 // Enables or disables listening for navigation commits for the given
34 // NavigationController. OnNavigationCommitted will be called for each
35 // navigation commit if listening is enabled.
36 virtual void SetListeningForNavigationCommit(
37 const content::NavigationController* nav_controller,
38 bool listen) = 0;
40 // Returns whether or not the observer is currently listening for navigation
41 // commits for the given NavigationController.
42 virtual bool IsListeningForNavigationCommit(
43 const content::NavigationController* nav_controller) = 0;
45 // Enables or disables listening for tab destruction for the given
46 // NavigationController. OnTabClosed will be called on tab destruction if
47 // listening is enabled.
48 virtual void SetListeningForTabDestruction(
49 const content::NavigationController* nav_controller,
50 bool listen) = 0;
52 // Returns whether or not the observer is currently listening for tab
53 // destruction for the given NavigationController.
54 virtual bool IsListeningForTabDestruction(
55 const content::NavigationController* nav_controller) = 0;
58 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_