| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 | 1153 |
| 1154 // Navigation to a javascript URL is not a "real" navigation so there is no | 1154 // Navigation to a javascript URL is not a "real" navigation so there is no |
| 1155 // need to create a NavigationHandle. The navigation commits immediately and | 1155 // need to create a NavigationHandle. The navigation commits immediately and |
| 1156 // the NavigationRequest is not assigned to the FrameTreeNode as navigating to | 1156 // the NavigationRequest is not assigned to the FrameTreeNode as navigating to |
| 1157 // a Javascript URL should not interrupt a previous navigation. | 1157 // a Javascript URL should not interrupt a previous navigation. |
| 1158 // Note: The scoped_request will be destroyed at the end of this function. | 1158 // Note: The scoped_request will be destroyed at the end of this function. |
| 1159 if (dest_url.SchemeIs(url::kJavaScriptScheme)) { | 1159 if (dest_url.SchemeIs(url::kJavaScriptScheme)) { |
| 1160 RenderFrameHostImpl* render_frame_host = | 1160 RenderFrameHostImpl* render_frame_host = |
| 1161 frame_tree_node->render_manager()->GetFrameHostForNavigation( | 1161 frame_tree_node->render_manager()->GetFrameHostForNavigation( |
| 1162 *scoped_request.get()); | 1162 *scoped_request.get()); |
| 1163 render_frame_host->CommitNavigation(nullptr, // response | 1163 render_frame_host->CommitNavigation( |
| 1164 nullptr, // body | 1164 nullptr, // response |
| 1165 scoped_request->common_params(), | 1165 nullptr, // body |
| 1166 scoped_request->request_params(), | 1166 mojo::ScopedDataPipeConsumerHandle(), scoped_request->common_params(), |
| 1167 scoped_request->is_view_source()); | 1167 scoped_request->request_params(), scoped_request->is_view_source()); |
| 1168 return; | 1168 return; |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 frame_tree_node->CreatedNavigationRequest(std::move(scoped_request)); | 1171 frame_tree_node->CreatedNavigationRequest(std::move(scoped_request)); |
| 1172 | 1172 |
| 1173 frame_tree_node->navigation_request()->CreateNavigationHandle( | 1173 frame_tree_node->navigation_request()->CreateNavigationHandle( |
| 1174 entry.GetUniqueID()); | 1174 entry.GetUniqueID()); |
| 1175 | 1175 |
| 1176 NavigationRequest* navigation_request = frame_tree_node->navigation_request(); | 1176 NavigationRequest* navigation_request = frame_tree_node->navigation_request(); |
| 1177 if (!navigation_request) | 1177 if (!navigation_request) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 if (navigation_handle) | 1293 if (navigation_handle) |
| 1294 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1294 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1295 | 1295 |
| 1296 controller_->SetPendingEntry(std::move(entry)); | 1296 controller_->SetPendingEntry(std::move(entry)); |
| 1297 if (delegate_) | 1297 if (delegate_) |
| 1298 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1298 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1299 } | 1299 } |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 } // namespace content | 1302 } // namespace content |
| OLD | NEW |