| OLD | NEW |
| 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #ifndef CHROME_COMMON_RESOURCE_DISPATCHER_H__ | 7 #ifndef CHROME_COMMON_RESOURCE_DISPATCHER_H_ |
| 8 #define CHROME_COMMON_RESOURCE_DISPATCHER_H__ | 8 #define CHROME_COMMON_RESOURCE_DISPATCHER_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/hash_tables.h" | 14 #include "base/hash_tables.h" |
| 15 #include "base/linked_ptr.h" | 15 #include "base/linked_ptr.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/task.h" | 17 #include "base/task.h" |
| 18 #include "ipc/ipc_channel.h" | 18 #include "ipc/ipc_channel.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const IPC::Message& message, | 107 const IPC::Message& message, |
| 108 int request_id, | 108 int request_id, |
| 109 base::SharedMemoryHandle data, | 109 base::SharedMemoryHandle data, |
| 110 int data_len); | 110 int data_len); |
| 111 void OnDownloadedData( | 111 void OnDownloadedData( |
| 112 const IPC::Message& message, | 112 const IPC::Message& message, |
| 113 int request_id, | 113 int request_id, |
| 114 int data_len); | 114 int data_len); |
| 115 void OnRequestComplete( | 115 void OnRequestComplete( |
| 116 int request_id, | 116 int request_id, |
| 117 const URLRequestStatus& status, | 117 const net::URLRequestStatus& status, |
| 118 const std::string& security_info, | 118 const std::string& security_info, |
| 119 const base::Time& completion_time); | 119 const base::Time& completion_time); |
| 120 | 120 |
| 121 // Dispatch the message to one of the message response handlers. | 121 // Dispatch the message to one of the message response handlers. |
| 122 void DispatchMessage(const IPC::Message& message); | 122 void DispatchMessage(const IPC::Message& message); |
| 123 | 123 |
| 124 // Dispatch any deferred messages for the given request, provided it is not | 124 // Dispatch any deferred messages for the given request, provided it is not |
| 125 // again in the deferred state. | 125 // again in the deferred state. |
| 126 void FlushDeferredMessages(int request_id); | 126 void FlushDeferredMessages(int request_id); |
| 127 | 127 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 142 IPC::Message::Sender* message_sender_; | 142 IPC::Message::Sender* message_sender_; |
| 143 | 143 |
| 144 // All pending requests issued to the host | 144 // All pending requests issued to the host |
| 145 PendingRequestList pending_requests_; | 145 PendingRequestList pending_requests_; |
| 146 | 146 |
| 147 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; | 147 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 149 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 #endif // CHROME_COMMON_RESOURCE_DISPATCHER_H__ | 152 #endif // CHROME_COMMON_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |