| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 namespace content { | 61 namespace content { |
| 62 class AppCacheService; | 62 class AppCacheService; |
| 63 class NavigationURLLoaderImplCore; | 63 class NavigationURLLoaderImplCore; |
| 64 class ResourceContext; | 64 class ResourceContext; |
| 65 class ResourceDispatcherHostDelegate; | 65 class ResourceDispatcherHostDelegate; |
| 66 class ResourceMessageDelegate; | 66 class ResourceMessageDelegate; |
| 67 class ResourceMessageFilter; | 67 class ResourceMessageFilter; |
| 68 class ResourceRequestInfoImpl; | 68 class ResourceRequestInfoImpl; |
| 69 class SaveFileManager; | 69 class SaveFileManager; |
| 70 class ServiceWorkerContextWrapper; |
| 70 class WebContentsImpl; | 71 class WebContentsImpl; |
| 71 struct CommonNavigationParams; | 72 struct CommonNavigationParams; |
| 72 struct DownloadSaveInfo; | 73 struct DownloadSaveInfo; |
| 73 struct NavigationRequestInfo; | 74 struct NavigationRequestInfo; |
| 74 struct Referrer; | 75 struct Referrer; |
| 75 | 76 |
| 76 class CONTENT_EXPORT ResourceDispatcherHostImpl | 77 class CONTENT_EXPORT ResourceDispatcherHostImpl |
| 77 : public ResourceDispatcherHost, | 78 : public ResourceDispatcherHost, |
| 78 public ResourceLoaderDelegate { | 79 public ResourceLoaderDelegate { |
| 79 public: | 80 public: |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // the request should cancel. | 267 // the request should cancel. |
| 267 bool HasSufficientResourcesForRequest(net::URLRequest* request); | 268 bool HasSufficientResourcesForRequest(net::URLRequest* request); |
| 268 | 269 |
| 269 // Called by a ResourceHandler after it has finished its request and is done | 270 // Called by a ResourceHandler after it has finished its request and is done |
| 270 // using its shared memory buffer. Frees up that file descriptor to be used | 271 // using its shared memory buffer. Frees up that file descriptor to be used |
| 271 // elsewhere. | 272 // elsewhere. |
| 272 void FinishedWithResourcesForRequest(net::URLRequest* request); | 273 void FinishedWithResourcesForRequest(net::URLRequest* request); |
| 273 | 274 |
| 274 // PlzNavigate: Begins a request for NavigationURLLoader. |loader| is the | 275 // PlzNavigate: Begins a request for NavigationURLLoader. |loader| is the |
| 275 // loader to attach to the leaf resource handler. | 276 // loader to attach to the leaf resource handler. |
| 276 void BeginNavigationRequest(ResourceContext* resource_context, | 277 void BeginNavigationRequest( |
| 277 int frame_tree_node_id, | 278 ResourceContext* resource_context, |
| 278 const NavigationRequestInfo& info, | 279 int frame_tree_node_id, |
| 279 NavigationURLLoaderImplCore* loader); | 280 const NavigationRequestInfo& info, |
| 281 NavigationURLLoaderImplCore* loader, |
| 282 ServiceWorkerContextWrapper* service_worker_context); |
| 280 | 283 |
| 281 private: | 284 private: |
| 282 friend class ResourceDispatcherHostTest; | 285 friend class ResourceDispatcherHostTest; |
| 283 | 286 |
| 284 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 287 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 285 TestBlockedRequestsProcessDies); | 288 TestBlockedRequestsProcessDies); |
| 286 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 289 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 287 CalculateApproximateMemoryCost); | 290 CalculateApproximateMemoryCost); |
| 288 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 291 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 289 DetachableResourceTimesOut); | 292 DetachableResourceTimesOut); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 DelegateMap delegate_map_; | 600 DelegateMap delegate_map_; |
| 598 | 601 |
| 599 scoped_ptr<ResourceScheduler> scheduler_; | 602 scoped_ptr<ResourceScheduler> scheduler_; |
| 600 | 603 |
| 601 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 604 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 602 }; | 605 }; |
| 603 | 606 |
| 604 } // namespace content | 607 } // namespace content |
| 605 | 608 |
| 606 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 609 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |