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

Unified Diff: content/public/browser/content_browser_client.h

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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
Index: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index f45cd7b3c7bcdbad417e54ea39fda8c42d3c056f..8de442a8b3281b2d3f5e406bd3460acb58b64636 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -98,6 +98,8 @@ class LocationProvider;
class MediaObserver;
class NavigatorConnectContext;
class NavigatorConnectServiceFactory;
+class NavigationHandle;
+class NavigationThrottle;
class PlatformNotificationService;
class PresentationServiceDelegate;
class QuotaPermissionContext;
@@ -652,6 +654,16 @@ class CONTENT_EXPORT ContentBrowserClient {
// Allows the embedder to record |metric| for a specific |url|.
virtual void RecordURLMetric(const std::string& metric, const GURL& url) {}
+ // Allows the embedder to register one or more NavigationThrottle for a
nasko 2015/09/04 23:36:49 nit: one or more implies the next word being plura
clamy 2015/09/08 16:27:19 Done.
+ // navigation. A NavigationThrottle is used to control the flow of a
+ // navigation on the UI thread. The embedder is guaranteed that the throttles
+ // will be executed in the order they were registered.
nasko 2015/09/04 23:36:49 nit: s/registered/provided/, since the embedder on
clamy 2015/09/08 16:27:19 Done.
+ // Note that the ownership of the NavigationThrottles returned will be taken
+ // by the NavigationHandle.
nasko 2015/09/04 23:36:49 This note won't be necessary if we have ScopedVect
clamy 2015/09/08 16:27:19 Done.
+ virtual std::vector<NavigationThrottle*> AddNavigationThrottles(
+ NavigationHandle* navigation_handle,
+ WebContents* web_contents);
+
// Populates |mappings| with all files that need to be mapped before launching
// a child process.
#if defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698