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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // hasn't been created yet. | 101 // hasn't been created yet. |
102 static ResourceDispatcherHostImpl* Get(); | 102 static ResourceDispatcherHostImpl* Get(); |
103 | 103 |
104 // ResourceDispatcherHost implementation: | 104 // ResourceDispatcherHost implementation: |
105 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; | 105 void SetDelegate(ResourceDispatcherHostDelegate* delegate) override; |
106 void SetAllowCrossOriginAuthPrompt(bool value) override; | 106 void SetAllowCrossOriginAuthPrompt(bool value) override; |
107 void ClearLoginDelegateForRequest(net::URLRequest* request) override; | 107 void ClearLoginDelegateForRequest(net::URLRequest* request) override; |
108 void RegisterInterceptor(const std::string& http_header, | 108 void RegisterInterceptor(const std::string& http_header, |
109 const std::string& starts_with, | 109 const std::string& starts_with, |
110 const InterceptorCallback& interceptor) override; | 110 const InterceptorCallback& interceptor) override; |
111 void ReprioritizeRequest(net::URLRequest* request, | |
112 net::RequestPriority priority) override; | |
113 | 111 |
114 // Puts the resource dispatcher host in an inactive state (unable to begin | 112 // Puts the resource dispatcher host in an inactive state (unable to begin |
115 // new requests). Cancels all pending requests. | 113 // new requests). Cancels all pending requests. |
116 void Shutdown(); | 114 void Shutdown(); |
117 | 115 |
118 // Force cancels any pending requests for the given |context|. This is | 116 // Force cancels any pending requests for the given |context|. This is |
119 // necessary to ensure that before |context| goes away, all requests | 117 // necessary to ensure that before |context| goes away, all requests |
120 // for it are dead. | 118 // for it are dead. |
121 void CancelRequestsForContext(ResourceContext* context); | 119 void CancelRequestsForContext(ResourceContext* context); |
122 | 120 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 772 |
775 // Task runner for the IO thead. | 773 // Task runner for the IO thead. |
776 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 774 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
777 | 775 |
778 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 776 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
779 }; | 777 }; |
780 | 778 |
781 } // namespace content | 779 } // namespace content |
782 | 780 |
783 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 781 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |