OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/navigation_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
6 | 6 |
7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.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/frame_host/navigation_controller_impl.h" | 9 #include "content/browser/frame_host/navigation_controller_impl.h" |
10 #include "content/browser/frame_host/navigation_handle_impl.h" | 10 #include "content/browser/frame_host/navigation_handle_impl.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 const NavigationEntryImpl* entry) | 153 const NavigationEntryImpl* entry) |
154 : frame_tree_node_(frame_tree_node), | 154 : frame_tree_node_(frame_tree_node), |
155 common_params_(common_params), | 155 common_params_(common_params), |
156 begin_params_(begin_params), | 156 begin_params_(begin_params), |
157 request_params_(request_params), | 157 request_params_(request_params), |
158 browser_initiated_(browser_initiated), | 158 browser_initiated_(browser_initiated), |
159 state_(NOT_STARTED), | 159 state_(NOT_STARTED), |
160 restore_type_(NavigationEntryImpl::RESTORE_NONE), | 160 restore_type_(NavigationEntryImpl::RESTORE_NONE), |
161 is_view_source_(false), | 161 is_view_source_(false), |
162 bindings_(NavigationEntryImpl::kInvalidBindings) { | 162 bindings_(NavigationEntryImpl::kInvalidBindings) { |
163 DCHECK_IMPLIES(browser_initiated, entry != nullptr && frame_entry != nullptr); | 163 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); |
164 if (browser_initiated) { | 164 if (browser_initiated) { |
165 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance | 165 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance |
166 // once it has been moved from the NavigationEntry. | 166 // once it has been moved from the NavigationEntry. |
167 source_site_instance_ = entry->source_site_instance(); | 167 source_site_instance_ = entry->source_site_instance(); |
168 dest_site_instance_ = frame_entry->site_instance(); | 168 dest_site_instance_ = frame_entry->site_instance(); |
169 restore_type_ = entry->restore_type(); | 169 restore_type_ = entry->restore_type(); |
170 is_view_source_ = entry->IsViewSourceMode(); | 170 is_view_source_ = entry->IsViewSourceMode(); |
171 bindings_ = entry->bindings(); | 171 bindings_ = entry->bindings(); |
172 } else { | 172 } else { |
173 // This is needed to have about:blank and data URLs commit in the same | 173 // This is needed to have about:blank and data URLs commit in the same |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 306 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
307 frame_tree_node_->ResetNavigationRequest(false); | 307 frame_tree_node_->ResetNavigationRequest(false); |
308 return; | 308 return; |
309 } | 309 } |
310 | 310 |
311 loader_->FollowRedirect(); | 311 loader_->FollowRedirect(); |
312 navigation_handle_->DidRedirectNavigation(common_params_.url); | 312 navigation_handle_->DidRedirectNavigation(common_params_.url); |
313 } | 313 } |
314 | 314 |
315 } // namespace content | 315 } // namespace content |
OLD | NEW |