OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/loader/resource_request_info_impl.h" | 5 #include "content/browser/loader/resource_request_info_impl.h" |
6 | 6 |
7 #include "content/browser/loader/global_routing_id.h" | 7 #include "content/browser/loader/global_routing_id.h" |
8 #include "content/browser/loader/resource_message_filter.h" | 8 #include "content/browser/loader/resource_message_filter.h" |
9 #include "content/common/net/url_request_user_data.h" | 9 #include "content/common/net/url_request_user_data.h" |
10 #include "content/public/browser/global_request_id.h" | 10 #include "content/public/browser/global_request_id.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 new ResourceRequestInfoImpl( | 45 new ResourceRequestInfoImpl( |
46 PROCESS_TYPE_RENDERER, // process_type | 46 PROCESS_TYPE_RENDERER, // process_type |
47 render_process_id, // child_id | 47 render_process_id, // child_id |
48 render_view_id, // route_id | 48 render_view_id, // route_id |
49 -1, // frame_tree_node_id | 49 -1, // frame_tree_node_id |
50 0, // origin_pid | 50 0, // origin_pid |
51 0, // request_id | 51 0, // request_id |
52 render_frame_id, // render_frame_id | 52 render_frame_id, // render_frame_id |
53 is_main_frame, // is_main_frame | 53 is_main_frame, // is_main_frame |
54 parent_is_main_frame, // parent_is_main_frame | 54 parent_is_main_frame, // parent_is_main_frame |
55 0, // parent_render_frame_id | |
56 resource_type, // resource_type | 55 resource_type, // resource_type |
57 ui::PAGE_TRANSITION_LINK, // transition_type | 56 ui::PAGE_TRANSITION_LINK, // transition_type |
58 false, // should_replace_current_entry | 57 false, // should_replace_current_entry |
59 false, // is_download | 58 false, // is_download |
60 false, // is_stream | 59 false, // is_stream |
61 allow_download, // allow_download | 60 allow_download, // allow_download |
62 false, // has_user_gesture | 61 false, // has_user_gesture |
63 false, // enable load timing | 62 false, // enable load timing |
64 request->has_upload(), // enable upload progress | 63 request->has_upload(), // enable upload progress |
65 false, // do_not_prompt_for_login | 64 false, // do_not_prompt_for_login |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 ResourceRequestInfoImpl::ResourceRequestInfoImpl( | 103 ResourceRequestInfoImpl::ResourceRequestInfoImpl( |
105 int process_type, | 104 int process_type, |
106 int child_id, | 105 int child_id, |
107 int route_id, | 106 int route_id, |
108 int frame_tree_node_id, | 107 int frame_tree_node_id, |
109 int origin_pid, | 108 int origin_pid, |
110 int request_id, | 109 int request_id, |
111 int render_frame_id, | 110 int render_frame_id, |
112 bool is_main_frame, | 111 bool is_main_frame, |
113 bool parent_is_main_frame, | 112 bool parent_is_main_frame, |
114 int parent_render_frame_id, | |
115 ResourceType resource_type, | 113 ResourceType resource_type, |
116 ui::PageTransition transition_type, | 114 ui::PageTransition transition_type, |
117 bool should_replace_current_entry, | 115 bool should_replace_current_entry, |
118 bool is_download, | 116 bool is_download, |
119 bool is_stream, | 117 bool is_stream, |
120 bool allow_download, | 118 bool allow_download, |
121 bool has_user_gesture, | 119 bool has_user_gesture, |
122 bool enable_load_timing, | 120 bool enable_load_timing, |
123 bool enable_upload_progress, | 121 bool enable_upload_progress, |
124 bool do_not_prompt_for_login, | 122 bool do_not_prompt_for_login, |
125 blink::WebReferrerPolicy referrer_policy, | 123 blink::WebReferrerPolicy referrer_policy, |
126 blink::WebPageVisibilityState visibility_state, | 124 blink::WebPageVisibilityState visibility_state, |
127 ResourceContext* context, | 125 ResourceContext* context, |
128 base::WeakPtr<ResourceMessageFilter> filter, | 126 base::WeakPtr<ResourceMessageFilter> filter, |
129 bool report_raw_headers, | 127 bool report_raw_headers, |
130 bool is_async) | 128 bool is_async) |
131 : cross_site_handler_(NULL), | 129 : cross_site_handler_(NULL), |
132 detachable_handler_(NULL), | 130 detachable_handler_(NULL), |
133 process_type_(process_type), | 131 process_type_(process_type), |
134 child_id_(child_id), | 132 child_id_(child_id), |
135 route_id_(route_id), | 133 route_id_(route_id), |
136 frame_tree_node_id_(frame_tree_node_id), | 134 frame_tree_node_id_(frame_tree_node_id), |
137 origin_pid_(origin_pid), | 135 origin_pid_(origin_pid), |
138 request_id_(request_id), | 136 request_id_(request_id), |
139 render_frame_id_(render_frame_id), | 137 render_frame_id_(render_frame_id), |
140 is_main_frame_(is_main_frame), | 138 is_main_frame_(is_main_frame), |
141 parent_is_main_frame_(parent_is_main_frame), | 139 parent_is_main_frame_(parent_is_main_frame), |
142 parent_render_frame_id_(parent_render_frame_id), | |
143 should_replace_current_entry_(should_replace_current_entry), | 140 should_replace_current_entry_(should_replace_current_entry), |
144 is_download_(is_download), | 141 is_download_(is_download), |
145 is_stream_(is_stream), | 142 is_stream_(is_stream), |
146 allow_download_(allow_download), | 143 allow_download_(allow_download), |
147 has_user_gesture_(has_user_gesture), | 144 has_user_gesture_(has_user_gesture), |
148 enable_load_timing_(enable_load_timing), | 145 enable_load_timing_(enable_load_timing), |
149 enable_upload_progress_(enable_upload_progress), | 146 enable_upload_progress_(enable_upload_progress), |
150 do_not_prompt_for_login_(do_not_prompt_for_login), | 147 do_not_prompt_for_login_(do_not_prompt_for_login), |
151 was_ignored_by_handler_(false), | 148 was_ignored_by_handler_(false), |
152 counted_as_in_flight_request_(false), | 149 counted_as_in_flight_request_(false), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 186 } |
190 | 187 |
191 bool ResourceRequestInfoImpl::IsMainFrame() const { | 188 bool ResourceRequestInfoImpl::IsMainFrame() const { |
192 return is_main_frame_; | 189 return is_main_frame_; |
193 } | 190 } |
194 | 191 |
195 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { | 192 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { |
196 return parent_is_main_frame_; | 193 return parent_is_main_frame_; |
197 } | 194 } |
198 | 195 |
199 int ResourceRequestInfoImpl::GetParentRenderFrameID() const { | |
200 return parent_render_frame_id_; | |
201 } | |
202 | |
203 ResourceType ResourceRequestInfoImpl::GetResourceType() const { | 196 ResourceType ResourceRequestInfoImpl::GetResourceType() const { |
204 return resource_type_; | 197 return resource_type_; |
205 } | 198 } |
206 | 199 |
207 int ResourceRequestInfoImpl::GetProcessType() const { | 200 int ResourceRequestInfoImpl::GetProcessType() const { |
208 return process_type_; | 201 return process_type_; |
209 } | 202 } |
210 | 203 |
211 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { | 204 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { |
212 return referrer_policy_; | 205 return referrer_policy_; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 264 |
272 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { | 265 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { |
273 return GlobalRoutingID(child_id_, route_id_); | 266 return GlobalRoutingID(child_id_, route_id_); |
274 } | 267 } |
275 | 268 |
276 void ResourceRequestInfoImpl::UpdateForTransfer( | 269 void ResourceRequestInfoImpl::UpdateForTransfer( |
277 int child_id, | 270 int child_id, |
278 int route_id, | 271 int route_id, |
279 int origin_pid, | 272 int origin_pid, |
280 int request_id, | 273 int request_id, |
281 int parent_render_frame_id, | |
282 base::WeakPtr<ResourceMessageFilter> filter) { | 274 base::WeakPtr<ResourceMessageFilter> filter) { |
283 child_id_ = child_id; | 275 child_id_ = child_id; |
284 route_id_ = route_id; | 276 route_id_ = route_id; |
285 origin_pid_ = origin_pid; | 277 origin_pid_ = origin_pid; |
286 request_id_ = request_id; | 278 request_id_ = request_id; |
287 parent_render_frame_id_ = parent_render_frame_id; | |
288 filter_ = filter; | 279 filter_ = filter; |
289 } | 280 } |
290 | 281 |
291 } // namespace content | 282 } // namespace content |
OLD | NEW |