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