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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "content/common/child_process_info.h" | 13 #include "content/common/child_process_info.h" |
| 14 #include "content/common/page_transition_types.h" |
14 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
15 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
16 #include "webkit/glue/resource_type.h" | 17 #include "webkit/glue/resource_type.h" |
17 | 18 |
18 class CrossSiteResourceHandler; | 19 class CrossSiteResourceHandler; |
19 class LoginHandler; | 20 class LoginHandler; |
20 class ResourceDispatcherHost; | 21 class ResourceDispatcherHost; |
21 class ResourceDispatcherHostLoginDelegate; | 22 class ResourceDispatcherHostLoginDelegate; |
22 class ResourceHandler; | 23 class ResourceHandler; |
23 class SSLClientAuthHandler; | 24 class SSLClientAuthHandler; |
(...skipping 14 matching lines...) Expand all Loading... |
38 ResourceDispatcherHostRequestInfo( | 39 ResourceDispatcherHostRequestInfo( |
39 ResourceHandler* handler, | 40 ResourceHandler* handler, |
40 ChildProcessInfo::ProcessType process_type, | 41 ChildProcessInfo::ProcessType process_type, |
41 int child_id, | 42 int child_id, |
42 int route_id, | 43 int route_id, |
43 int origin_pid, | 44 int origin_pid, |
44 int request_id, | 45 int request_id, |
45 bool is_main_frame, | 46 bool is_main_frame, |
46 int64 frame_id, | 47 int64 frame_id, |
47 ResourceType::Type resource_type, | 48 ResourceType::Type resource_type, |
| 49 PageTransition::Type transition_type, |
48 uint64 upload_size, | 50 uint64 upload_size, |
49 bool is_download, | 51 bool is_download, |
50 bool allow_download, | 52 bool allow_download, |
51 bool has_user_gesture, | 53 bool has_user_gesture, |
52 const content::ResourceContext* context); | 54 const content::ResourceContext* context); |
53 virtual ~ResourceDispatcherHostRequestInfo(); | 55 virtual ~ResourceDispatcherHostRequestInfo(); |
54 | 56 |
55 // Top-level ResourceHandler servicing this request. | 57 // Top-level ResourceHandler servicing this request. |
56 ResourceHandler* resource_handler() { return resource_handler_.get(); } | 58 ResourceHandler* resource_handler() { return resource_handler_.get(); } |
57 | 59 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 bool is_download() const { return is_download_; } | 125 bool is_download() const { return is_download_; } |
124 void set_is_download(bool download) { is_download_ = download; } | 126 void set_is_download(bool download) { is_download_ = download; } |
125 | 127 |
126 // The number of clients that have called pause on this request. | 128 // The number of clients that have called pause on this request. |
127 int pause_count() const { return pause_count_; } | 129 int pause_count() const { return pause_count_; } |
128 void set_pause_count(int count) { pause_count_ = count; } | 130 void set_pause_count(int count) { pause_count_ = count; } |
129 | 131 |
130 // Identifies the type of resource, such as subframe, media, etc. | 132 // Identifies the type of resource, such as subframe, media, etc. |
131 ResourceType::Type resource_type() const { return resource_type_; } | 133 ResourceType::Type resource_type() const { return resource_type_; } |
132 | 134 |
| 135 PageTransition::Type transition_type() const { return transition_type_; } |
| 136 |
133 // When there is upload data, this is the byte count of that data. When there | 137 // When there is upload data, this is the byte count of that data. When there |
134 // is no upload, this will be 0. | 138 // is no upload, this will be 0. |
135 uint64 upload_size() const { return upload_size_; } | 139 uint64 upload_size() const { return upload_size_; } |
136 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } | 140 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } |
137 | 141 |
138 // When we're uploading data, this is the the byte offset into the uploaded | 142 // When we're uploading data, this is the the byte offset into the uploaded |
139 // data that we've uploaded that we've send an upload progress update about. | 143 // data that we've uploaded that we've send an upload progress update about. |
140 // The ResourceDispatcherHost will periodically update this value to track | 144 // The ResourceDispatcherHost will periodically update this value to track |
141 // upload progress and make sure it doesn't sent out duplicate updates. | 145 // upload progress and make sure it doesn't sent out duplicate updates. |
142 uint64 last_upload_position() const { return last_upload_position_; } | 146 uint64 last_upload_position() const { return last_upload_position_; } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 int origin_pid_; | 217 int origin_pid_; |
214 int request_id_; | 218 int request_id_; |
215 bool is_main_frame_; | 219 bool is_main_frame_; |
216 int64 frame_id_; | 220 int64 frame_id_; |
217 int pending_data_count_; | 221 int pending_data_count_; |
218 bool is_download_; | 222 bool is_download_; |
219 bool allow_download_; | 223 bool allow_download_; |
220 bool has_user_gesture_; | 224 bool has_user_gesture_; |
221 int pause_count_; | 225 int pause_count_; |
222 ResourceType::Type resource_type_; | 226 ResourceType::Type resource_type_; |
| 227 PageTransition::Type transition_type_; |
223 uint64 upload_size_; | 228 uint64 upload_size_; |
224 uint64 last_upload_position_; | 229 uint64 last_upload_position_; |
225 base::TimeTicks last_upload_ticks_; | 230 base::TimeTicks last_upload_ticks_; |
226 bool waiting_for_upload_progress_ack_; | 231 bool waiting_for_upload_progress_ack_; |
227 int memory_cost_; | 232 int memory_cost_; |
228 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 233 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
229 const content::ResourceContext* context_; | 234 const content::ResourceContext* context_; |
230 | 235 |
231 // "Private" data accessible only to ResourceDispatcherHost (use the | 236 // "Private" data accessible only to ResourceDispatcherHost (use the |
232 // accessors above for consistency). | 237 // accessors above for consistency). |
233 bool is_paused_; | 238 bool is_paused_; |
234 bool called_on_response_started_; | 239 bool called_on_response_started_; |
235 bool has_started_reading_; | 240 bool has_started_reading_; |
236 int paused_read_bytes_; | 241 int paused_read_bytes_; |
237 | 242 |
238 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); | 243 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); |
239 }; | 244 }; |
240 | 245 |
241 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ | 246 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ |
OLD | NEW |