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 const NavigationRequestInfo& info, |
279 NavigationURLLoaderImplCore* loader); | 280 NavigationURLLoaderImplCore* loader, |
281 ServiceWorkerContextWrapper* service_worker_context); | |
michaeln
2015/10/01 01:42:16
its more common to pass refptrs into methods as
Fabrice (no longer in Chrome)
2015/10/01 18:29:55
Done.
| |
280 | 282 |
281 private: | 283 private: |
282 friend class ResourceDispatcherHostTest; | 284 friend class ResourceDispatcherHostTest; |
283 | 285 |
284 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 286 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
285 TestBlockedRequestsProcessDies); | 287 TestBlockedRequestsProcessDies); |
286 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 288 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
287 CalculateApproximateMemoryCost); | 289 CalculateApproximateMemoryCost); |
288 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 290 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
289 DetachableResourceTimesOut); | 291 DetachableResourceTimesOut); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
595 DelegateMap delegate_map_; | 597 DelegateMap delegate_map_; |
596 | 598 |
597 scoped_ptr<ResourceScheduler> scheduler_; | 599 scoped_ptr<ResourceScheduler> scheduler_; |
598 | 600 |
599 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 601 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
600 }; | 602 }; |
601 | 603 |
602 } // namespace content | 604 } // namespace content |
603 | 605 |
604 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 606 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |