OLD | NEW |
---|---|
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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/task_scheduler/task_scheduler.h" | 17 #include "base/task_scheduler/task_scheduler.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "content/public/browser/certificate_request_result_type.h" | 20 #include "content/public/browser/certificate_request_result_type.h" |
21 #include "content/public/browser/navigation_throttle.h" | 21 #include "content/public/browser/navigation_throttle.h" |
22 #include "content/public/common/associated_interface_registry.h" | 22 #include "content/public/common/associated_interface_registry.h" |
23 #include "content/public/common/content_client.h" | 23 #include "content/public/common/content_client.h" |
24 #include "content/public/common/media_stream_request.h" | 24 #include "content/public/common/media_stream_request.h" |
25 #include "content/public/common/network_service.mojom.h" | |
25 #include "content/public/common/resource_type.h" | 26 #include "content/public/common/resource_type.h" |
26 #include "content/public/common/sandbox_type.h" | 27 #include "content/public/common/sandbox_type.h" |
27 #include "content/public/common/socket_permission_request.h" | 28 #include "content/public/common/socket_permission_request.h" |
28 #include "content/public/common/window_container_type.mojom.h" | 29 #include "content/public/common/window_container_type.mojom.h" |
29 #include "media/media_features.h" | 30 #include "media/media_features.h" |
30 #include "media/mojo/interfaces/remoting.mojom.h" | 31 #include "media/mojo/interfaces/remoting.mojom.h" |
31 #include "net/base/mime_util.h" | 32 #include "net/base/mime_util.h" |
32 #include "net/cookies/canonical_cookie.h" | 33 #include "net/cookies/canonical_cookie.h" |
33 #include "services/service_manager/embedder/embedded_service_info.h" | 34 #include "services/service_manager/embedder/embedded_service_info.h" |
34 #include "services/service_manager/public/cpp/binder_registry.h" | 35 #include "services/service_manager/public/cpp/binder_registry.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 class TracingDelegate; | 137 class TracingDelegate; |
137 class URLLoaderThrottle; | 138 class URLLoaderThrottle; |
138 class VpnServiceProxy; | 139 class VpnServiceProxy; |
139 class WebContents; | 140 class WebContents; |
140 class WebContentsViewDelegate; | 141 class WebContentsViewDelegate; |
141 struct MainFunctionParams; | 142 struct MainFunctionParams; |
142 struct OpenURLParams; | 143 struct OpenURLParams; |
143 struct Referrer; | 144 struct Referrer; |
144 struct WebPreferences; | 145 struct WebPreferences; |
145 | 146 |
147 namespace mojom { | |
148 class NetworkContext; | |
149 } | |
150 | |
146 // Embedder API (or SPI) for participating in browser logic, to be implemented | 151 // Embedder API (or SPI) for participating in browser logic, to be implemented |
147 // by the client of the content browser. See ChromeContentBrowserClient for the | 152 // by the client of the content browser. See ChromeContentBrowserClient for the |
148 // principal implementation. The methods are assumed to be called on the UI | 153 // principal implementation. The methods are assumed to be called on the UI |
149 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 154 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
150 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 155 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
151 // (Often, the call out to the client can happen in a different part of the code | 156 // (Often, the call out to the client can happen in a different part of the code |
152 // that either already has a hook out to the embedder, or calls out to one of | 157 // that either already has a hook out to the embedder, or calls out to one of |
153 // the observer interfaces.) | 158 // the observer interfaces.) |
154 class CONTENT_EXPORT ContentBrowserClient { | 159 class CONTENT_EXPORT ContentBrowserClient { |
155 public: | 160 public: |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
815 // Provides parameters for initializing the global task scheduler. Default | 820 // Provides parameters for initializing the global task scheduler. Default |
816 // params are used if this returns nullptr. | 821 // params are used if this returns nullptr. |
817 virtual std::unique_ptr<base::TaskScheduler::InitParams> | 822 virtual std::unique_ptr<base::TaskScheduler::InitParams> |
818 GetTaskSchedulerInitParams(); | 823 GetTaskSchedulerInitParams(); |
819 | 824 |
820 // Allows the embedder to register one or more URLLoaderThrottles for a | 825 // Allows the embedder to register one or more URLLoaderThrottles for a |
821 // URL request. This is used only when --enable-network-service is in effect. | 826 // URL request. This is used only when --enable-network-service is in effect. |
822 // This is called on the IO thread. | 827 // This is called on the IO thread. |
823 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> | 828 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> |
824 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); | 829 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); |
830 | |
831 // Creates the main NetworkContext for a BrowserContext. It's called only once | |
832 // for a given BrowserContext. | |
833 virtual mojom::NetworkContextPtr CreateMainNetworkContext( | |
834 BrowserContext* context); | |
835 | |
836 // Creates the main NetworkContext for a BrowserContext's StoragePartition. It | |
jam
2017/07/18 20:26:27
I'm having trouble seeing these two methods descri
mmenke
2017/07/18 20:57:34
I'm not sufficiently familiar with StoragePartitio
| |
837 // can be called multiple times for a given BrowserContext. | |
838 virtual mojom::NetworkContextPtr CreateNetworkContextForStoragePartition( | |
839 BrowserContext* context, | |
840 bool in_memory, | |
841 const base::FilePath& partition_path); | |
825 }; | 842 }; |
826 | 843 |
827 } // namespace content | 844 } // namespace content |
828 | 845 |
829 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 846 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |