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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Notify the ResourceDispatcherHostImpl of a resource context destruction. | 103 // Notify the ResourceDispatcherHostImpl of a resource context destruction. |
104 void RemoveResourceContext(ResourceContext* context); | 104 void RemoveResourceContext(ResourceContext* context); |
105 | 105 |
106 // Force cancels any pending requests for the given |context|. This is | 106 // Force cancels any pending requests for the given |context|. This is |
107 // necessary to ensure that before |context| goes away, all requests | 107 // necessary to ensure that before |context| goes away, all requests |
108 // for it are dead. | 108 // for it are dead. |
109 void CancelRequestsForContext(ResourceContext* context); | 109 void CancelRequestsForContext(ResourceContext* context); |
110 | 110 |
111 // Returns true if the message was a resource message that was processed. | 111 // Returns true if the message was a resource message that was processed. |
112 // If it was, message_was_ok will be false iff the message was corrupt. | |
113 bool OnMessageReceived(const IPC::Message& message, | 112 bool OnMessageReceived(const IPC::Message& message, |
114 ResourceMessageFilter* filter, | 113 ResourceMessageFilter* filter); |
115 bool* message_was_ok); | |
116 | 114 |
117 // Initiates a save file from the browser process (as opposed to a resource | 115 // Initiates a save file from the browser process (as opposed to a resource |
118 // request from the renderer or another child process). | 116 // request from the renderer or another child process). |
119 void BeginSaveFile(const GURL& url, | 117 void BeginSaveFile(const GURL& url, |
120 const Referrer& referrer, | 118 const Referrer& referrer, |
121 int child_id, | 119 int child_id, |
122 int route_id, | 120 int route_id, |
123 ResourceContext* context); | 121 ResourceContext* context); |
124 | 122 |
125 // Cancels the given request if it still exists. | 123 // Cancels the given request if it still exists. |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 DelegateMap delegate_map_; | 502 DelegateMap delegate_map_; |
505 | 503 |
506 scoped_ptr<ResourceScheduler> scheduler_; | 504 scoped_ptr<ResourceScheduler> scheduler_; |
507 | 505 |
508 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 506 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
509 }; | 507 }; |
510 | 508 |
511 } // namespace content | 509 } // namespace content |
512 | 510 |
513 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 511 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |