| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } // namespace net | 54 } // namespace net |
| 55 | 55 |
| 56 namespace webkit_blob { | 56 namespace webkit_blob { |
| 57 class DeletableFileReference; | 57 class DeletableFileReference; |
| 58 } | 58 } |
| 59 | 59 |
| 60 class ResourceDispatcherHost : public net::URLRequest::Delegate { | 60 class ResourceDispatcherHost : public net::URLRequest::Delegate { |
| 61 public: | 61 public: |
| 62 explicit ResourceDispatcherHost( | 62 explicit ResourceDispatcherHost( |
| 63 const ResourceQueue::DelegateSet& resource_queue_delegates); | 63 const ResourceQueue::DelegateSet& resource_queue_delegates); |
| 64 ~ResourceDispatcherHost(); | 64 virtual ~ResourceDispatcherHost(); |
| 65 | 65 |
| 66 void Initialize(); | 66 void Initialize(); |
| 67 | 67 |
| 68 // Puts the resource dispatcher host in an inactive state (unable to begin | 68 // Puts the resource dispatcher host in an inactive state (unable to begin |
| 69 // new requests). Cancels all pending requests. | 69 // new requests). Cancels all pending requests. |
| 70 void Shutdown(); | 70 void Shutdown(); |
| 71 | 71 |
| 72 // Returns true if the message was a resource message that was processed. | 72 // Returns true if the message was a resource message that was processed. |
| 73 // If it was, message_was_ok will be false iff the message was corrupt. | 73 // If it was, message_was_ok will be false iff the message was corrupt. |
| 74 bool OnMessageReceived(const IPC::Message& message, | 74 bool OnMessageReceived(const IPC::Message& message, |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // to the source of the message. | 476 // to the source of the message. |
| 477 ResourceMessageFilter* filter_; | 477 ResourceMessageFilter* filter_; |
| 478 | 478 |
| 479 static bool is_prefetch_enabled_; | 479 static bool is_prefetch_enabled_; |
| 480 | 480 |
| 481 | 481 |
| 482 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 482 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 483 }; | 483 }; |
| 484 | 484 |
| 485 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 485 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |