| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 lofi_state, navigation_start), | 394 lofi_state, navigation_start), |
| 395 entry.ConstructStartNavigationParams(), | 395 entry.ConstructStartNavigationParams(), |
| 396 entry.ConstructRequestNavigationParams( | 396 entry.ConstructRequestNavigationParams( |
| 397 frame_entry, is_same_document_history_load, | 397 frame_entry, is_same_document_history_load, |
| 398 is_history_navigation_in_new_child, | 398 is_history_navigation_in_new_child, |
| 399 frame_tree_node->has_committed_real_load(), | 399 frame_tree_node->has_committed_real_load(), |
| 400 controller_->GetPendingEntryIndex() == -1, | 400 controller_->GetPendingEntryIndex() == -1, |
| 401 controller_->GetIndexOfEntry(&entry), | 401 controller_->GetIndexOfEntry(&entry), |
| 402 controller_->GetLastCommittedEntryIndex(), | 402 controller_->GetLastCommittedEntryIndex(), |
| 403 controller_->GetEntryCount())); | 403 controller_->GetEntryCount())); |
| 404 } else { | |
| 405 // No need to navigate again. Just resume the deferred request. | |
| 406 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( | |
| 407 entry.transferred_global_request_id()); | |
| 408 } | 404 } |
| 409 } | 405 } |
| 410 | 406 |
| 411 // Make sure no code called via RFH::Navigate clears the pending entry. | 407 // Make sure no code called via RFH::Navigate clears the pending entry. |
| 412 if (is_pending_entry) | 408 if (is_pending_entry) |
| 413 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 409 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
| 414 | 410 |
| 415 if (controller_->GetPendingEntryIndex() == -1 && | 411 if (controller_->GetPendingEntryIndex() == -1 && |
| 416 dest_url.SchemeIs(url::kJavaScriptScheme)) { | 412 dest_url.SchemeIs(url::kJavaScriptScheme)) { |
| 417 // If the pending entry index is -1 (which means a new navigation rather | 413 // If the pending entry index is -1 (which means a new navigation rather |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 if (pending_entry != controller_->GetVisibleEntry() || | 1198 if (pending_entry != controller_->GetVisibleEntry() || |
| 1203 !should_preserve_entry) { | 1199 !should_preserve_entry) { |
| 1204 controller_->DiscardPendingEntry(true); | 1200 controller_->DiscardPendingEntry(true); |
| 1205 | 1201 |
| 1206 // Also force the UI to refresh. | 1202 // Also force the UI to refresh. |
| 1207 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1203 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
| 1208 } | 1204 } |
| 1209 } | 1205 } |
| 1210 | 1206 |
| 1211 } // namespace content | 1207 } // namespace content |
| OLD | NEW |