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/frame_host/frame_tree_node.h" | 7 #include "content/browser/frame_host/frame_tree_node.h" |
8 #include "content/browser/loader/global_routing_id.h" | 8 #include "content/browser/loader/global_routing_id.h" |
9 #include "content/browser/loader/resource_message_filter.h" | 9 #include "content/browser/loader/resource_message_filter.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 new ResourceRequestInfoImpl( | 64 new ResourceRequestInfoImpl( |
65 PROCESS_TYPE_RENDERER, // process_type | 65 PROCESS_TYPE_RENDERER, // process_type |
66 render_process_id, // child_id | 66 render_process_id, // child_id |
67 render_view_id, // route_id | 67 render_view_id, // route_id |
68 -1, // frame_tree_node_id | 68 -1, // frame_tree_node_id |
69 0, // origin_pid | 69 0, // origin_pid |
70 0, // request_id | 70 0, // request_id |
71 render_frame_id, // render_frame_id | 71 render_frame_id, // render_frame_id |
72 is_main_frame, // is_main_frame | 72 is_main_frame, // is_main_frame |
73 parent_is_main_frame, // parent_is_main_frame | 73 parent_is_main_frame, // parent_is_main_frame |
74 0, // parent_render_frame_id | |
75 resource_type, // resource_type | 74 resource_type, // resource_type |
76 ui::PAGE_TRANSITION_LINK, // transition_type | 75 ui::PAGE_TRANSITION_LINK, // transition_type |
77 false, // should_replace_current_entry | 76 false, // should_replace_current_entry |
78 false, // is_download | 77 false, // is_download |
79 false, // is_stream | 78 false, // is_stream |
80 allow_download, // allow_download | 79 allow_download, // allow_download |
81 false, // has_user_gesture | 80 false, // has_user_gesture |
82 false, // enable load timing | 81 false, // enable load timing |
83 request->has_upload(), // enable upload progress | 82 request->has_upload(), // enable upload progress |
84 false, // do_not_prompt_for_login | 83 false, // do_not_prompt_for_login |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ResourceRequestInfoImpl::ResourceRequestInfoImpl( | 124 ResourceRequestInfoImpl::ResourceRequestInfoImpl( |
126 int process_type, | 125 int process_type, |
127 int child_id, | 126 int child_id, |
128 int route_id, | 127 int route_id, |
129 int frame_tree_node_id, | 128 int frame_tree_node_id, |
130 int origin_pid, | 129 int origin_pid, |
131 int request_id, | 130 int request_id, |
132 int render_frame_id, | 131 int render_frame_id, |
133 bool is_main_frame, | 132 bool is_main_frame, |
134 bool parent_is_main_frame, | 133 bool parent_is_main_frame, |
135 int parent_render_frame_id, | |
136 ResourceType resource_type, | 134 ResourceType resource_type, |
137 ui::PageTransition transition_type, | 135 ui::PageTransition transition_type, |
138 bool should_replace_current_entry, | 136 bool should_replace_current_entry, |
139 bool is_download, | 137 bool is_download, |
140 bool is_stream, | 138 bool is_stream, |
141 bool allow_download, | 139 bool allow_download, |
142 bool has_user_gesture, | 140 bool has_user_gesture, |
143 bool enable_load_timing, | 141 bool enable_load_timing, |
144 bool enable_upload_progress, | 142 bool enable_upload_progress, |
145 bool do_not_prompt_for_login, | 143 bool do_not_prompt_for_login, |
146 blink::WebReferrerPolicy referrer_policy, | 144 blink::WebReferrerPolicy referrer_policy, |
147 blink::WebPageVisibilityState visibility_state, | 145 blink::WebPageVisibilityState visibility_state, |
148 ResourceContext* context, | 146 ResourceContext* context, |
149 base::WeakPtr<ResourceMessageFilter> filter, | 147 base::WeakPtr<ResourceMessageFilter> filter, |
150 bool report_raw_headers, | 148 bool report_raw_headers, |
151 bool is_async, | 149 bool is_async, |
152 bool is_using_lofi, | 150 bool is_using_lofi, |
153 const std::string& original_headers) | 151 const std::string& original_headers) |
154 : cross_site_handler_(NULL), | 152 : cross_site_handler_(NULL), |
155 detachable_handler_(NULL), | 153 detachable_handler_(NULL), |
156 process_type_(process_type), | 154 process_type_(process_type), |
157 child_id_(child_id), | 155 child_id_(child_id), |
158 route_id_(route_id), | 156 route_id_(route_id), |
159 frame_tree_node_id_(frame_tree_node_id), | 157 frame_tree_node_id_(frame_tree_node_id), |
160 origin_pid_(origin_pid), | 158 origin_pid_(origin_pid), |
161 request_id_(request_id), | 159 request_id_(request_id), |
162 render_frame_id_(render_frame_id), | 160 render_frame_id_(render_frame_id), |
163 is_main_frame_(is_main_frame), | 161 is_main_frame_(is_main_frame), |
164 parent_is_main_frame_(parent_is_main_frame), | 162 parent_is_main_frame_(parent_is_main_frame), |
165 parent_render_frame_id_(parent_render_frame_id), | |
166 should_replace_current_entry_(should_replace_current_entry), | 163 should_replace_current_entry_(should_replace_current_entry), |
167 is_download_(is_download), | 164 is_download_(is_download), |
168 is_stream_(is_stream), | 165 is_stream_(is_stream), |
169 allow_download_(allow_download), | 166 allow_download_(allow_download), |
170 has_user_gesture_(has_user_gesture), | 167 has_user_gesture_(has_user_gesture), |
171 enable_load_timing_(enable_load_timing), | 168 enable_load_timing_(enable_load_timing), |
172 enable_upload_progress_(enable_upload_progress), | 169 enable_upload_progress_(enable_upload_progress), |
173 do_not_prompt_for_login_(do_not_prompt_for_login), | 170 do_not_prompt_for_login_(do_not_prompt_for_login), |
174 was_ignored_by_handler_(false), | 171 was_ignored_by_handler_(false), |
175 counted_as_in_flight_request_(false), | 172 counted_as_in_flight_request_(false), |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 230 } |
234 | 231 |
235 bool ResourceRequestInfoImpl::IsMainFrame() const { | 232 bool ResourceRequestInfoImpl::IsMainFrame() const { |
236 return is_main_frame_; | 233 return is_main_frame_; |
237 } | 234 } |
238 | 235 |
239 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { | 236 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { |
240 return parent_is_main_frame_; | 237 return parent_is_main_frame_; |
241 } | 238 } |
242 | 239 |
243 int ResourceRequestInfoImpl::GetParentRenderFrameID() const { | |
244 return parent_render_frame_id_; | |
245 } | |
246 | |
247 ResourceType ResourceRequestInfoImpl::GetResourceType() const { | 240 ResourceType ResourceRequestInfoImpl::GetResourceType() const { |
248 return resource_type_; | 241 return resource_type_; |
249 } | 242 } |
250 | 243 |
251 int ResourceRequestInfoImpl::GetProcessType() const { | 244 int ResourceRequestInfoImpl::GetProcessType() const { |
252 return process_type_; | 245 return process_type_; |
253 } | 246 } |
254 | 247 |
255 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { | 248 blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { |
256 return referrer_policy_; | 249 return referrer_policy_; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 316 |
324 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { | 317 GlobalRoutingID ResourceRequestInfoImpl::GetGlobalRoutingID() const { |
325 return GlobalRoutingID(child_id_, route_id_); | 318 return GlobalRoutingID(child_id_, route_id_); |
326 } | 319 } |
327 | 320 |
328 void ResourceRequestInfoImpl::UpdateForTransfer( | 321 void ResourceRequestInfoImpl::UpdateForTransfer( |
329 int child_id, | 322 int child_id, |
330 int route_id, | 323 int route_id, |
331 int origin_pid, | 324 int origin_pid, |
332 int request_id, | 325 int request_id, |
333 int parent_render_frame_id, | |
334 base::WeakPtr<ResourceMessageFilter> filter) { | 326 base::WeakPtr<ResourceMessageFilter> filter) { |
335 child_id_ = child_id; | 327 child_id_ = child_id; |
336 route_id_ = route_id; | 328 route_id_ = route_id; |
337 origin_pid_ = origin_pid; | 329 origin_pid_ = origin_pid; |
338 request_id_ = request_id; | 330 request_id_ = request_id; |
339 parent_render_frame_id_ = parent_render_frame_id; | |
340 filter_ = filter; | 331 filter_ = filter; |
341 } | 332 } |
342 | 333 |
343 } // namespace content | 334 } // namespace content |
OLD | NEW |