Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / components / google / core / browser / google_url_tracker_client.h
blob45c101b5fabfb26d41bd97c9059932afb8c551c9
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"
9 #include "url/gurl.h"
11 class GoogleURLTracker;
12 class PrefService;
14 namespace net {
15 class URLRequestContextGetter;
18 // Interface by which GoogleURLTracker communicates with its embedder.
19 class GoogleURLTrackerClient {
20 public:
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
34 // starts.
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
44 // should use.
45 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
47 protected:
48 GoogleURLTracker* google_url_tracker() { return google_url_tracker_; }
50 private:
51 GoogleURLTracker* google_url_tracker_;
53 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient);
56 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_