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