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

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: 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 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "content/public/browser/certificate_request_result_type.h" 18 #include "content/public/browser/certificate_request_result_type.h"
19 #include "content/public/browser/navigation_throttle.h"
19 #include "content/public/common/content_client.h" 20 #include "content/public/common/content_client.h"
20 #include "content/public/common/media_stream_request.h" 21 #include "content/public/common/media_stream_request.h"
21 #include "content/public/common/resource_type.h" 22 #include "content/public/common/resource_type.h"
22 #include "content/public/common/socket_permission_request.h" 23 #include "content/public/common/socket_permission_request.h"
23 #include "content/public/common/window_container_type.h" 24 #include "content/public/common/window_container_type.h"
24 #include "net/base/mime_util.h" 25 #include "net/base/mime_util.h"
25 #include "net/cookies/canonical_cookie.h" 26 #include "net/cookies/canonical_cookie.h"
26 #include "net/url_request/url_request_interceptor.h" 27 #include "net/url_request/url_request_interceptor.h"
27 #include "net/url_request/url_request_job_factory.h" 28 #include "net/url_request/url_request_job_factory.h"
28 #include "storage/browser/fileapi/file_system_context.h" 29 #include "storage/browser/fileapi/file_system_context.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 class BrowserPluginGuestDelegate; 92 class BrowserPluginGuestDelegate;
92 class BrowserPpapiHost; 93 class BrowserPpapiHost;
93 class BrowserURLHandler; 94 class BrowserURLHandler;
94 class ClientCertificateDelegate; 95 class ClientCertificateDelegate;
95 class DevToolsManagerDelegate; 96 class DevToolsManagerDelegate;
96 class ExternalVideoSurfaceContainer; 97 class ExternalVideoSurfaceContainer;
97 class LocationProvider; 98 class LocationProvider;
98 class MediaObserver; 99 class MediaObserver;
99 class NavigatorConnectContext; 100 class NavigatorConnectContext;
100 class NavigatorConnectServiceFactory; 101 class NavigatorConnectServiceFactory;
102 class NavigationHandle;
Charlie Reis 2015/09/11 00:06:48 nit: Alphabetize.
clamy 2015/09/16 01:03:21 Done.
101 class PlatformNotificationService; 103 class PlatformNotificationService;
102 class PresentationServiceDelegate; 104 class PresentationServiceDelegate;
103 class QuotaPermissionContext; 105 class QuotaPermissionContext;
104 class RenderFrameHost; 106 class RenderFrameHost;
105 class RenderProcessHost; 107 class RenderProcessHost;
106 class RenderViewHost; 108 class RenderViewHost;
107 class ResourceContext; 109 class ResourceContext;
108 class ServiceRegistry; 110 class ServiceRegistry;
109 class SiteInstance; 111 class SiteInstance;
110 class SpeechRecognitionManagerDelegate; 112 class SpeechRecognitionManagerDelegate;
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 // Allows programmatic opening of a new tab/window without going through 662 // Allows programmatic opening of a new tab/window without going through
661 // another WebContents. For example, from a Worker. |callback| will be 663 // another WebContents. For example, from a Worker. |callback| will be
662 // invoked with the appropriate WebContents* when available. 664 // invoked with the appropriate WebContents* when available.
663 virtual void OpenURL(BrowserContext* browser_context, 665 virtual void OpenURL(BrowserContext* browser_context,
664 const OpenURLParams& params, 666 const OpenURLParams& params,
665 const base::Callback<void(WebContents*)>& callback); 667 const base::Callback<void(WebContents*)>& callback);
666 668
667 // Allows the embedder to record |metric| for a specific |url|. 669 // Allows the embedder to record |metric| for a specific |url|.
668 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} 670 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {}
669 671
672 // Allows the embedder to register one or more NavigationThrottles for a
673 // navigation. A NavigationThrottle is used to control the flow of a
Charlie Reis 2015/09/11 00:06:48 nit: for the navigation indicated by |navigation_h
clamy 2015/09/16 01:03:21 Done.
674 // navigation on the UI thread. The embedder is guaranteed that the throttles
675 // will be executed in the order they were provided.
676 virtual ScopedVector<NavigationThrottle> GetNavigationThrottles(
Charlie Reis 2015/09/11 00:06:48 "GetNavigationThrottles" sounds like an accessor f
clamy 2015/09/16 01:03:21 Done.
677 NavigationHandle* navigation_handle);
678
670 // Populates |mappings| with all files that need to be mapped before launching 679 // Populates |mappings| with all files that need to be mapped before launching
671 // a child process. 680 // a child process.
672 #if defined(OS_ANDROID) 681 #if defined(OS_ANDROID)
673 virtual void GetAdditionalMappedFilesForChildProcess( 682 virtual void GetAdditionalMappedFilesForChildProcess(
674 const base::CommandLine& command_line, 683 const base::CommandLine& command_line,
675 int child_process_id, 684 int child_process_id,
676 content::FileDescriptorInfo* mappings, 685 content::FileDescriptorInfo* mappings,
677 std::map<int, base::MemoryMappedFile::Region>* regions) {} 686 std::map<int, base::MemoryMappedFile::Region>* regions) {}
678 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 687 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
679 virtual void GetAdditionalMappedFilesForChildProcess( 688 virtual void GetAdditionalMappedFilesForChildProcess(
(...skipping 23 matching lines...) Expand all
703 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 712 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
704 // implementation. Return nullptr to disable external surface video. 713 // implementation. Return nullptr to disable external surface video.
705 virtual ExternalVideoSurfaceContainer* 714 virtual ExternalVideoSurfaceContainer*
706 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 715 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
707 #endif 716 #endif
708 }; 717 };
709 718
710 } // namespace content 719 } // namespace content
711 720
712 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 721 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698