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

Unified Diff: components/google/core/browser/google_url_tracker_client.h

Issue 285193002: Create GoogleURLTrackerClient interface and //chrome implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « components/google.gypi ('k') | components/google/core/browser/google_url_tracker_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/google/core/browser/google_url_tracker_client.h
diff --git a/components/google/core/browser/google_url_tracker_client.h b/components/google/core/browser/google_url_tracker_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..ab9e2718d7aa737761d5b2bc74aaabf49ec32f78
--- /dev/null
+++ b/components/google/core/browser/google_url_tracker_client.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
+#define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
+
+#include "base/macros.h"
+
+class GoogleURLTracker;
+
+// Interface by which GoogleURLTracker communicates with its embedder.
+class GoogleURLTrackerClient {
+ public:
+ GoogleURLTrackerClient();
+ virtual ~GoogleURLTrackerClient();
+
+ // Sets the GoogleURLTracker that is associated with this client.
+ void set_google_url_tracker(GoogleURLTracker* google_url_tracker) {
+ google_url_tracker_ = google_url_tracker;
+ }
+
+ // Enables or disables listening for navigation starts. OnNavigationPending
+ // will be called for each navigation start if listening is enabled.
+ virtual void SetListeningForNavigationStart(bool listen) = 0;
+
+ // Returns whether or not the client is currently listening for navigation
+ // starts.
+ virtual bool IsListeningForNavigationStart() = 0;
+
+ protected:
+ GoogleURLTracker* google_url_tracker() { return google_url_tracker_; }
+
+ private:
+ GoogleURLTracker* google_url_tracker_;
+
+ DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient);
+};
+
+#endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
« no previous file with comments | « components/google.gypi ('k') | components/google/core/browser/google_url_tracker_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698