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