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 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 5 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
6 | 6 |
7 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" |
8 #include "content/browser/renderer_host/resource_handler.h" | 8 #include "content/browser/renderer_host/resource_handler.h" |
9 #include "content/browser/ssl/ssl_client_auth_handler.h" | 9 #include "content/browser/ssl/ssl_client_auth_handler.h" |
10 #include "webkit/blob/blob_data.h" | 10 #include "webkit/blob/blob_data.h" |
11 | 11 |
12 ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( | 12 ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( |
13 ResourceHandler* handler, | 13 ResourceHandler* handler, |
14 ChildProcessInfo::ProcessType process_type, | 14 ChildProcessInfo::ProcessType process_type, |
15 int child_id, | 15 int child_id, |
16 int route_id, | 16 int route_id, |
17 int origin_pid, | 17 int origin_pid, |
18 int request_id, | 18 int request_id, |
19 bool is_main_frame, | 19 bool is_main_frame, |
20 int64 frame_id, | 20 int64 frame_id, |
21 ResourceType::Type resource_type, | 21 ResourceType::Type resource_type, |
| 22 PageTransition::Type transition_type, |
22 uint64 upload_size, | 23 uint64 upload_size, |
23 bool is_download, | 24 bool is_download, |
24 bool allow_download, | 25 bool allow_download, |
25 bool has_user_gesture, | 26 bool has_user_gesture, |
26 const content::ResourceContext* context) | 27 const content::ResourceContext* context) |
27 : resource_handler_(handler), | 28 : resource_handler_(handler), |
28 cross_site_handler_(NULL), | 29 cross_site_handler_(NULL), |
29 process_type_(process_type), | 30 process_type_(process_type), |
30 child_id_(child_id), | 31 child_id_(child_id), |
31 route_id_(route_id), | 32 route_id_(route_id), |
32 origin_pid_(origin_pid), | 33 origin_pid_(origin_pid), |
33 request_id_(request_id), | 34 request_id_(request_id), |
34 is_main_frame_(is_main_frame), | 35 is_main_frame_(is_main_frame), |
35 frame_id_(frame_id), | 36 frame_id_(frame_id), |
36 pending_data_count_(0), | 37 pending_data_count_(0), |
37 is_download_(is_download), | 38 is_download_(is_download), |
38 allow_download_(allow_download), | 39 allow_download_(allow_download), |
39 has_user_gesture_(has_user_gesture), | 40 has_user_gesture_(has_user_gesture), |
40 pause_count_(0), | 41 pause_count_(0), |
41 resource_type_(resource_type), | 42 resource_type_(resource_type), |
| 43 transition_type_(transition_type), |
42 upload_size_(upload_size), | 44 upload_size_(upload_size), |
43 last_upload_position_(0), | 45 last_upload_position_(0), |
44 waiting_for_upload_progress_ack_(false), | 46 waiting_for_upload_progress_ack_(false), |
45 memory_cost_(0), | 47 memory_cost_(0), |
46 context_(context), | 48 context_(context), |
47 is_paused_(false), | 49 is_paused_(false), |
48 called_on_response_started_(false), | 50 called_on_response_started_(false), |
49 has_started_reading_(false), | 51 has_started_reading_(false), |
50 paused_read_bytes_(0) { | 52 paused_read_bytes_(0) { |
51 } | 53 } |
52 | 54 |
53 ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() { | 55 ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() { |
54 resource_handler_->OnRequestClosed(); | 56 resource_handler_->OnRequestClosed(); |
55 } | 57 } |
56 | 58 |
57 void ResourceDispatcherHostRequestInfo::set_login_delegate( | 59 void ResourceDispatcherHostRequestInfo::set_login_delegate( |
58 ResourceDispatcherHostLoginDelegate* ld) { | 60 ResourceDispatcherHostLoginDelegate* ld) { |
59 login_delegate_ = ld; | 61 login_delegate_ = ld; |
60 } | 62 } |
61 | 63 |
62 void ResourceDispatcherHostRequestInfo::set_ssl_client_auth_handler( | 64 void ResourceDispatcherHostRequestInfo::set_ssl_client_auth_handler( |
63 SSLClientAuthHandler* s) { | 65 SSLClientAuthHandler* s) { |
64 ssl_client_auth_handler_ = s; | 66 ssl_client_auth_handler_ = s; |
65 } | 67 } |
66 | 68 |
67 void ResourceDispatcherHostRequestInfo::set_requested_blob_data( | 69 void ResourceDispatcherHostRequestInfo::set_requested_blob_data( |
68 webkit_blob::BlobData* data) { | 70 webkit_blob::BlobData* data) { |
69 requested_blob_data_ = data; | 71 requested_blob_data_ = data; |
70 } | 72 } |
OLD | NEW |