Chromium Code Reviews| 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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
| 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
| 7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
| 8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
| 9 // | 9 // |
| 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 namespace webkit_blob { | 51 namespace webkit_blob { |
| 52 class ShareableFileReference; | 52 class ShareableFileReference; |
| 53 } | 53 } |
| 54 | 54 |
| 55 namespace content { | 55 namespace content { |
| 56 class ResourceContext; | 56 class ResourceContext; |
| 57 class ResourceDispatcherHostDelegate; | 57 class ResourceDispatcherHostDelegate; |
| 58 class ResourceMessageDelegate; | 58 class ResourceMessageDelegate; |
| 59 class ResourceMessageFilter; | 59 class ResourceMessageFilter; |
| 60 class ResourceRequestInfoImpl; | 60 class ResourceRequestInfoImpl; |
| 61 class StreamResourceHandler; | |
| 61 class SaveFileManager; | 62 class SaveFileManager; |
| 62 class WebContentsImpl; | 63 class WebContentsImpl; |
| 63 struct DownloadSaveInfo; | 64 struct DownloadSaveInfo; |
| 64 struct Referrer; | 65 struct Referrer; |
| 65 | 66 |
| 66 class CONTENT_EXPORT ResourceDispatcherHostImpl | 67 class CONTENT_EXPORT ResourceDispatcherHostImpl |
| 67 : public ResourceDispatcherHost, | 68 : public ResourceDispatcherHost, |
| 68 public ResourceLoaderDelegate { | 69 public ResourceLoaderDelegate { |
| 69 public: | 70 public: |
| 70 ResourceDispatcherHostImpl(); | 71 ResourceDispatcherHostImpl(); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 bool is_content_initiated, | 207 bool is_content_initiated, |
| 207 bool must_download, | 208 bool must_download, |
| 208 uint32 id, | 209 uint32 id, |
| 209 scoped_ptr<DownloadSaveInfo> save_info, | 210 scoped_ptr<DownloadSaveInfo> save_info, |
| 210 const DownloadUrlParameters::OnStartedCallback& started_cb); | 211 const DownloadUrlParameters::OnStartedCallback& started_cb); |
| 211 | 212 |
| 212 // Must be called after the ResourceRequestInfo has been created | 213 // Must be called after the ResourceRequestInfo has been created |
| 213 // and associated with the request. | 214 // and associated with the request. |
| 214 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( | 215 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( |
| 215 net::URLRequest* request, | 216 net::URLRequest* request, |
| 216 ResourceResponse* response); | 217 ResourceResponse* response, |
| 218 std::string* payload); | |
|
mmenke
2014/05/29 16:10:29
Please document payload, and how behavior is diffe
Zachary Kuznia
2014/05/29 20:42:40
Done.
| |
| 217 | 219 |
| 218 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); | 220 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); |
| 219 | 221 |
| 220 ResourceScheduler* scheduler() { return scheduler_.get(); } | 222 ResourceScheduler* scheduler() { return scheduler_.get(); } |
| 221 | 223 |
| 222 // Called by a ResourceHandler when it's ready to start reading data and | 224 // Called by a ResourceHandler when it's ready to start reading data and |
| 223 // sending it to the renderer. Returns true if there are enough file | 225 // sending it to the renderer. Returns true if there are enough file |
| 224 // descriptors available for the shared memory buffer. If false is returned, | 226 // descriptors available for the shared memory buffer. If false is returned, |
| 225 // the request should cancel. | 227 // the request should cancel. |
| 226 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); | 228 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 DelegateMap delegate_map_; | 504 DelegateMap delegate_map_; |
| 503 | 505 |
| 504 scoped_ptr<ResourceScheduler> scheduler_; | 506 scoped_ptr<ResourceScheduler> scheduler_; |
| 505 | 507 |
| 506 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 508 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 507 }; | 509 }; |
| 508 | 510 |
| 509 } // namespace content | 511 } // namespace content |
| 510 | 512 |
| 511 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 513 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |