| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const RequestNavigationParams& request_params, | 151 const RequestNavigationParams& request_params, |
| 152 bool browser_initiated, | 152 bool browser_initiated, |
| 153 const FrameNavigationEntry* frame_entry, | 153 const FrameNavigationEntry* frame_entry, |
| 154 const NavigationEntryImpl* entry) | 154 const NavigationEntryImpl* entry) |
| 155 : frame_tree_node_(frame_tree_node), | 155 : frame_tree_node_(frame_tree_node), |
| 156 common_params_(common_params), | 156 common_params_(common_params), |
| 157 begin_params_(begin_params), | 157 begin_params_(begin_params), |
| 158 request_params_(request_params), | 158 request_params_(request_params), |
| 159 browser_initiated_(browser_initiated), | 159 browser_initiated_(browser_initiated), |
| 160 state_(NOT_STARTED), | 160 state_(NOT_STARTED), |
| 161 restore_type_(NavigationEntryImpl::RESTORE_NONE), | 161 restore_type_(RestoreType::NONE), |
| 162 is_view_source_(false), | 162 is_view_source_(false), |
| 163 bindings_(NavigationEntryImpl::kInvalidBindings), | 163 bindings_(NavigationEntryImpl::kInvalidBindings), |
| 164 associated_site_instance_type_(AssociatedSiteInstanceType::NONE) { | 164 associated_site_instance_type_(AssociatedSiteInstanceType::NONE) { |
| 165 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); | 165 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); |
| 166 if (browser_initiated) { | 166 if (browser_initiated) { |
| 167 FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame_tree_node); | 167 FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame_tree_node); |
| 168 if (frame_entry) { | 168 if (frame_entry) { |
| 169 source_site_instance_ = frame_entry->source_site_instance(); | 169 source_site_instance_ = frame_entry->source_site_instance(); |
| 170 dest_site_instance_ = frame_entry->site_instance(); | 170 dest_site_instance_ = frame_entry->site_instance(); |
| 171 } | 171 } |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 is_view_source_); | 451 is_view_source_); |
| 452 | 452 |
| 453 // When navigating to a Javascript url, the NavigationRequest is not stored | 453 // When navigating to a Javascript url, the NavigationRequest is not stored |
| 454 // in the FrameTreeNode. Therefore do not reset it, as this could cancel an | 454 // in the FrameTreeNode. Therefore do not reset it, as this could cancel an |
| 455 // existing pending navigation. | 455 // existing pending navigation. |
| 456 if (!common_params_.url.SchemeIs(url::kJavaScriptScheme)) | 456 if (!common_params_.url.SchemeIs(url::kJavaScriptScheme)) |
| 457 frame_tree_node_->ResetNavigationRequest(true); | 457 frame_tree_node_->ResetNavigationRequest(true); |
| 458 } | 458 } |
| 459 | 459 |
| 460 } // namespace content | 460 } // namespace content |
| OLD | NEW |