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 // 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 CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 7 #ifndef CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
8 #define CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 8 #define CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 int data_len, | 115 int data_len, |
116 int encoded_data_length); | 116 int encoded_data_length); |
117 void OnDownloadedData( | 117 void OnDownloadedData( |
118 const IPC::Message& message, | 118 const IPC::Message& message, |
119 int request_id, | 119 int request_id, |
120 int data_len); | 120 int data_len); |
121 void OnRequestComplete( | 121 void OnRequestComplete( |
122 int request_id, | 122 int request_id, |
123 const net::URLRequestStatus& status, | 123 const net::URLRequestStatus& status, |
124 const std::string& security_info, | 124 const std::string& security_info, |
125 const base::Time& completion_time); | 125 const base::TimeTicks& completion_time); |
126 | 126 |
127 // Dispatch the message to one of the message response handlers. | 127 // Dispatch the message to one of the message response handlers. |
128 void DispatchMessage(const IPC::Message& message); | 128 void DispatchMessage(const IPC::Message& message); |
129 | 129 |
130 // Dispatch any deferred messages for the given request, provided it is not | 130 // Dispatch any deferred messages for the given request, provided it is not |
131 // again in the deferred state. | 131 // again in the deferred state. |
132 void FlushDeferredMessages(int request_id); | 132 void FlushDeferredMessages(int request_id); |
133 | 133 |
134 // Returns true if the message passed in is a resource related message. | 134 // Returns true if the message passed in is a resource related message. |
135 static bool IsResourceDispatcherMessage(const IPC::Message& message); | 135 static bool IsResourceDispatcherMessage(const IPC::Message& message); |
(...skipping 15 matching lines...) Expand all Loading... |
151 PendingRequestList pending_requests_; | 151 PendingRequestList pending_requests_; |
152 | 152 |
153 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; | 153 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; |
154 | 154 |
155 ResourceDispatcherDelegate* delegate_; | 155 ResourceDispatcherDelegate* delegate_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 157 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
158 }; | 158 }; |
159 | 159 |
160 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 160 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
OLD | NEW |