| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class ShareableFileReference; | 55 class ShareableFileReference; |
| 56 } | 56 } |
| 57 | 57 |
| 58 namespace content { | 58 namespace content { |
| 59 class AppCacheNavigationHandleCore; | 59 class AppCacheNavigationHandleCore; |
| 60 class AppCacheService; | 60 class AppCacheService; |
| 61 class AsyncRevalidationManager; | 61 class AsyncRevalidationManager; |
| 62 class LoaderDelegate; | 62 class LoaderDelegate; |
| 63 class NavigationURLLoaderImplCore; | 63 class NavigationURLLoaderImplCore; |
| 64 class NavigationUIData; | 64 class NavigationUIData; |
| 65 class RenderFrameHostImpl; | |
| 66 class ResourceContext; | 65 class ResourceContext; |
| 67 class ResourceDispatcherHostDelegate; | 66 class ResourceDispatcherHostDelegate; |
| 68 class ResourceLoader; | 67 class ResourceLoader; |
| 69 class ResourceHandler; | 68 class ResourceHandler; |
| 70 class ResourceMessageDelegate; | 69 class ResourceMessageDelegate; |
| 71 class ResourceRequesterInfo; | 70 class ResourceRequesterInfo; |
| 72 class ResourceRequestInfoImpl; | 71 class ResourceRequestInfoImpl; |
| 73 class ResourceScheduler; | 72 class ResourceScheduler; |
| 74 class ServiceWorkerNavigationHandleCore; | 73 class ServiceWorkerNavigationHandleCore; |
| 75 struct NavigationRequestInfo; | 74 struct NavigationRequestInfo; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 101 // hasn't been created yet. | 100 // hasn't been created yet. |
| 102 static ResourceDispatcherHostImpl* Get(); | 101 static ResourceDispatcherHostImpl* Get(); |
| 103 | 102 |
| 104 // The following static methods should all be called from the UI thread. | 103 // The following static methods should all be called from the UI thread. |
| 105 | 104 |
| 106 // Resumes requests for a given render frame routing id. This will only resume | 105 // Resumes requests for a given render frame routing id. This will only resume |
| 107 // requests for a single frame. | 106 // requests for a single frame. |
| 108 static void ResumeBlockedRequestsForRouteFromUI( | 107 static void ResumeBlockedRequestsForRouteFromUI( |
| 109 const GlobalFrameRoutingId& global_routing_id); | 108 const GlobalFrameRoutingId& global_routing_id); |
| 110 | 109 |
| 111 // Blocks (and does not start) all requests for the frame and its subframes. | |
| 112 static void BlockRequestsForFrameFromUI(RenderFrameHost* root_frame_host); | |
| 113 | |
| 114 // Resumes any blocked requests for the specified frame and its subframes. | |
| 115 static void ResumeBlockedRequestsForFrameFromUI( | |
| 116 RenderFrameHost* root_frame_host); | |
| 117 | |
| 118 // Cancels any blocked request for the frame and its subframes. | |
| 119 static void CancelBlockedRequestsForFrameFromUI( | |
| 120 RenderFrameHostImpl* root_frame_host); | |
| 121 | |
| 122 // ResourceDispatcherHost implementation: | 110 // ResourceDispatcherHost implementation: |
| 123 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; | 111 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; |
| 124 void SetAllowCrossOriginAuthPrompt(bool value) override; | 112 void SetAllowCrossOriginAuthPrompt(bool value) override; |
| 125 void ClearLoginDelegateForRequest(net::URLRequest* request) override; | 113 void ClearLoginDelegateForRequest(net::URLRequest* request) override; |
| 126 void RegisterInterceptor(const std::string& http_header, | 114 void RegisterInterceptor(const std::string& http_header, |
| 127 const std::string& starts_with, | 115 const std::string& starts_with, |
| 128 const InterceptorCallback& interceptor) override; | 116 const InterceptorCallback& interceptor) override; |
| 129 | 117 |
| 130 // Puts the resource dispatcher host in an inactive state (unable to begin | 118 // Puts the resource dispatcher host in an inactive state (unable to begin |
| 131 // new requests). Cancels all pending requests. | 119 // new requests). Cancels all pending requests. |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 774 |
| 787 // Points to the registered download handler intercept. | 775 // Points to the registered download handler intercept. |
| 788 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 776 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 789 | 777 |
| 790 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 778 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 791 }; | 779 }; |
| 792 | 780 |
| 793 } // namespace content | 781 } // namespace content |
| 794 | 782 |
| 795 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 783 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |