1 // Copyright 2014 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 COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
6 #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
8 #include "base/macros.h"
11 class GoogleURLTracker
;
15 class URLRequestContextGetter
;
18 // Interface by which GoogleURLTracker communicates with its embedder.
19 class GoogleURLTrackerClient
{
21 GoogleURLTrackerClient();
22 virtual ~GoogleURLTrackerClient();
24 // Sets the GoogleURLTracker that is associated with this client.
25 void set_google_url_tracker(GoogleURLTracker
* google_url_tracker
) {
26 google_url_tracker_
= google_url_tracker
;
29 // Enables or disables listening for navigation starts. OnNavigationPending
30 // will be called for each navigation start if listening is enabled.
31 virtual void SetListeningForNavigationStart(bool listen
) = 0;
33 // Returns whether or not the client is currently listening for navigation
35 virtual bool IsListeningForNavigationStart() = 0;
37 // Returns whether background networking is enabled.
38 virtual bool IsBackgroundNetworkingEnabled() = 0;
40 // Returns the PrefService that the GoogleURLTracker should use.
41 virtual PrefService
* GetPrefs() = 0;
43 // Returns the URL request context information that the GoogleURLTracker
45 virtual net::URLRequestContextGetter
* GetRequestContext() = 0;
48 GoogleURLTracker
* google_url_tracker() { return google_url_tracker_
; }
51 GoogleURLTracker
* google_url_tracker_
;
53 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient
);
56 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_