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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 class BrowserPluginGuestDelegate; 91 class BrowserPluginGuestDelegate;
92 class BrowserPpapiHost; 92 class BrowserPpapiHost;
93 class BrowserURLHandler; 93 class BrowserURLHandler;
94 class ClientCertificateDelegate; 94 class ClientCertificateDelegate;
95 class DevToolsManagerDelegate; 95 class DevToolsManagerDelegate;
96 class ExternalVideoSurfaceContainer; 96 class ExternalVideoSurfaceContainer;
97 class LocationProvider; 97 class LocationProvider;
98 class MediaObserver; 98 class MediaObserver;
99 class NavigatorConnectContext; 99 class NavigatorConnectContext;
100 class NavigatorConnectServiceFactory; 100 class NavigatorConnectServiceFactory;
101 class NavigationHandle;
101 class PlatformNotificationService; 102 class PlatformNotificationService;
102 class PresentationServiceDelegate; 103 class PresentationServiceDelegate;
103 class QuotaPermissionContext; 104 class QuotaPermissionContext;
104 class RenderFrameHost; 105 class RenderFrameHost;
105 class RenderProcessHost; 106 class RenderProcessHost;
106 class RenderViewHost; 107 class RenderViewHost;
107 class ResourceContext; 108 class ResourceContext;
108 class ServiceRegistry; 109 class ServiceRegistry;
109 class SiteInstance; 110 class SiteInstance;
110 class SpeechRecognitionManagerDelegate; 111 class SpeechRecognitionManagerDelegate;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // Allows programmatic opening of a new tab/window without going through 646 // Allows programmatic opening of a new tab/window without going through
646 // another WebContents. For example, from a Worker. |callback| will be 647 // another WebContents. For example, from a Worker. |callback| will be
647 // invoked with the appropriate WebContents* when available. 648 // invoked with the appropriate WebContents* when available.
648 virtual void OpenURL(BrowserContext* browser_context, 649 virtual void OpenURL(BrowserContext* browser_context,
649 const OpenURLParams& params, 650 const OpenURLParams& params,
650 const base::Callback<void(WebContents*)>& callback); 651 const base::Callback<void(WebContents*)>& callback);
651 652
652 // Allows the embedder to record |metric| for a specific |url|. 653 // Allows the embedder to record |metric| for a specific |url|.
653 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} 654 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {}
654 655
656 // Allows the embedder to register NavigationThrottles for a navigation.
nasko 2015/08/31 23:25:15 nit: s/NavigationThrottles/one or more NavigationT
clamy 2015/09/03 15:30:52 Done.
657 // NavigationThrottles are used to control the flow of a navigation on the UI
nasko 2015/08/31 23:25:15 nit: Singular NavigationThrottle.
clamy 2015/09/03 15:30:52 Done.
658 // thread. The embedder is guaranteed that the throttles will be executed in
659 // the order they were registered.
nasko 2015/08/31 23:25:15 The order is guaranteed for each embedder, but emb
Avi (use Gerrit) 2015/09/01 16:38:47 What do you mean by that question? There is always
660 virtual void AddNavigationThrottles(NavigationHandle* navigation_handle,
661 WebContents* web_contents) {}
davidben 2015/09/01 21:55:18 It's a little odd that this API is called AddNavig
clamy 2015/09/03 15:30:52 Due to changes to the NavigationHandle interface,
662
655 // Populates |mappings| with all files that need to be mapped before launching 663 // Populates |mappings| with all files that need to be mapped before launching
656 // a child process. 664 // a child process.
657 #if defined(OS_ANDROID) 665 #if defined(OS_ANDROID)
658 virtual void GetAdditionalMappedFilesForChildProcess( 666 virtual void GetAdditionalMappedFilesForChildProcess(
659 const base::CommandLine& command_line, 667 const base::CommandLine& command_line,
660 int child_process_id, 668 int child_process_id,
661 content::FileDescriptorInfo* mappings, 669 content::FileDescriptorInfo* mappings,
662 std::map<int, base::MemoryMappedFile::Region>* regions) {} 670 std::map<int, base::MemoryMappedFile::Region>* regions) {}
663 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 671 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
664 virtual void GetAdditionalMappedFilesForChildProcess( 672 virtual void GetAdditionalMappedFilesForChildProcess(
(...skipping 23 matching lines...) Expand all
688 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 696 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
689 // implementation. Return nullptr to disable external surface video. 697 // implementation. Return nullptr to disable external surface video.
690 virtual ExternalVideoSurfaceContainer* 698 virtual ExternalVideoSurfaceContainer*
691 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 699 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
692 #endif 700 #endif
693 }; 701 };
694 702
695 } // namespace content 703 } // namespace content
696 704
697 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 705 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698