| 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 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 // The renderer-initiated navigation request is ignored iff a) there is an | 999 // The renderer-initiated navigation request is ignored iff a) there is an |
| 1000 // ongoing request b) which is browser or user-initiated and c) the renderer | 1000 // ongoing request b) which is browser or user-initiated and c) the renderer |
| 1001 // request is not user-initiated. | 1001 // request is not user-initiated. |
| 1002 if (ongoing_navigation_request && | 1002 if (ongoing_navigation_request && |
| 1003 (ongoing_navigation_request->browser_initiated() || | 1003 (ongoing_navigation_request->browser_initiated() || |
| 1004 ongoing_navigation_request->begin_params().has_user_gesture) && | 1004 ongoing_navigation_request->begin_params().has_user_gesture) && |
| 1005 !begin_params.has_user_gesture) { | 1005 !begin_params.has_user_gesture) { |
| 1006 RenderFrameHost* current_frame_host = | 1006 RenderFrameHost* current_frame_host = |
| 1007 frame_tree_node->render_manager()->current_frame_host(); | 1007 frame_tree_node->render_manager()->current_frame_host(); |
| 1008 current_frame_host->Send( | 1008 current_frame_host->Send( |
| 1009 new FrameMsg_Stop(current_frame_host->GetRoutingID())); | 1009 new FrameMsg_DroppedNavigation(current_frame_host->GetRoutingID())); |
| 1010 return; | 1010 return; |
| 1011 } | 1011 } |
| 1012 | 1012 |
| 1013 // In all other cases the current navigation, if any, is canceled and a new | 1013 // In all other cases the current navigation, if any, is canceled and a new |
| 1014 // NavigationRequest is created for the node. | 1014 // NavigationRequest is created for the node. |
| 1015 frame_tree_node->CreatedNavigationRequest( | 1015 frame_tree_node->CreatedNavigationRequest( |
| 1016 NavigationRequest::CreateRendererInitiated( | 1016 NavigationRequest::CreateRendererInitiated( |
| 1017 frame_tree_node, common_params, begin_params, | 1017 frame_tree_node, common_params, begin_params, |
| 1018 controller_->GetLastCommittedEntryIndex(), | 1018 controller_->GetLastCommittedEntryIndex(), |
| 1019 controller_->GetEntryCount())); | 1019 controller_->GetEntryCount())); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 if (navigation_handle) | 1302 if (navigation_handle) |
| 1303 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1303 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1304 | 1304 |
| 1305 controller_->SetPendingEntry(std::move(entry)); | 1305 controller_->SetPendingEntry(std::move(entry)); |
| 1306 if (delegate_) | 1306 if (delegate_) |
| 1307 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1307 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1308 } | 1308 } |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 } // namespace content | 1311 } // namespace content |
| OLD | NEW |