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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 uint32 id, | 235 uint32 id, |
236 scoped_ptr<DownloadSaveInfo> save_info, | 236 scoped_ptr<DownloadSaveInfo> save_info, |
237 const DownloadUrlParameters::OnStartedCallback& started_cb); | 237 const DownloadUrlParameters::OnStartedCallback& started_cb); |
238 | 238 |
239 // Must be called after the ResourceRequestInfo has been created | 239 // Must be called after the ResourceRequestInfo has been created |
240 // and associated with the request. If |payload| is set to a non-empty value, | 240 // and associated with the request. If |payload| is set to a non-empty value, |
241 // the value will be sent to the old resource handler instead of canceling | 241 // the value will be sent to the old resource handler instead of canceling |
242 // it, except on HTTP errors. This is marked virtual so it can be overriden in | 242 // it, except on HTTP errors. This is marked virtual so it can be overriden in |
243 // testing. | 243 // testing. |
244 virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream( | 244 virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream( |
245 const base::FilePath& plugin_path, | |
mmenke
2015/03/24 14:44:32
Need to forward declare this (Admittedly, should h
Deepak
2015/03/25 05:43:35
Done.
| |
245 net::URLRequest* request, | 246 net::URLRequest* request, |
246 ResourceResponse* response, | 247 ResourceResponse* response, |
247 std::string* payload); | 248 std::string* payload); |
248 | 249 |
249 ResourceScheduler* scheduler() { return scheduler_.get(); } | 250 ResourceScheduler* scheduler() { return scheduler_.get(); } |
250 | 251 |
251 // Called by a ResourceHandler when it's ready to start reading data and | 252 // Called by a ResourceHandler when it's ready to start reading data and |
252 // sending it to the renderer. Returns true if there are enough file | 253 // sending it to the renderer. Returns true if there are enough file |
253 // descriptors available for the shared memory buffer. If false is returned, | 254 // descriptors available for the shared memory buffer. If false is returned, |
254 // the request should cancel. | 255 // the request should cancel. |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
581 DelegateMap delegate_map_; | 582 DelegateMap delegate_map_; |
582 | 583 |
583 scoped_ptr<ResourceScheduler> scheduler_; | 584 scoped_ptr<ResourceScheduler> scheduler_; |
584 | 585 |
585 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 586 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
586 }; | 587 }; |
587 | 588 |
588 } // namespace content | 589 } // namespace content |
589 | 590 |
590 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 591 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |