OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
| 6 #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 class GoogleURLTracker; |
| 11 |
| 12 // Interface by which GoogleURLTracker communicates with its embedder. |
| 13 class GoogleURLTrackerClient { |
| 14 public: |
| 15 GoogleURLTrackerClient(); |
| 16 virtual ~GoogleURLTrackerClient(); |
| 17 |
| 18 // Sets the GoogleURLTracker that is associated with this client. |
| 19 void set_google_url_tracker(GoogleURLTracker* google_url_tracker) { |
| 20 google_url_tracker_ = google_url_tracker; |
| 21 } |
| 22 |
| 23 // Enables or disables listening for navigation starts. OnNavigationPending |
| 24 // will be called for each navigation start if listening is enabled. |
| 25 virtual void SetListeningForNavigationStart(bool listen) = 0; |
| 26 |
| 27 // Returns whether or not the client is currently listening for navigation |
| 28 // starts. |
| 29 virtual bool IsListeningForNavigationStart() = 0; |
| 30 |
| 31 protected: |
| 32 GoogleURLTracker* google_url_tracker() { return google_url_tracker_; } |
| 33 |
| 34 private: |
| 35 GoogleURLTracker* google_url_tracker_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient); |
| 38 }; |
| 39 |
| 40 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
OLD | NEW |