| 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 /* | 5 /* |
| 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 } | 881 } |
| 882 } | 882 } |
| 883 | 883 |
| 884 switch (details->type) { | 884 switch (details->type) { |
| 885 case NAVIGATION_TYPE_NEW_PAGE: | 885 case NAVIGATION_TYPE_NEW_PAGE: |
| 886 RendererDidNavigateToNewPage(rfh, params, details->is_same_document, | 886 RendererDidNavigateToNewPage(rfh, params, details->is_same_document, |
| 887 details->did_replace_entry, | 887 details->did_replace_entry, |
| 888 navigation_handle); | 888 navigation_handle); |
| 889 break; | 889 break; |
| 890 case NAVIGATION_TYPE_EXISTING_PAGE: | 890 case NAVIGATION_TYPE_EXISTING_PAGE: |
| 891 details->did_replace_entry = details->is_same_document; | 891 // In-page navigations always replace the previous entry. This is the |
| 892 // case for history.replaceState(), as well as back and forward across |
| 893 // fragment entries and history.pushState() entries. |
| 894 if (details->is_same_document) |
| 895 details->did_replace_entry = true; |
| 896 |
| 892 RendererDidNavigateToExistingPage(rfh, params, details->is_same_document, | 897 RendererDidNavigateToExistingPage(rfh, params, details->is_same_document, |
| 893 was_restored, navigation_handle); | 898 was_restored, navigation_handle); |
| 894 break; | 899 break; |
| 895 case NAVIGATION_TYPE_SAME_PAGE: | 900 case NAVIGATION_TYPE_SAME_PAGE: |
| 896 RendererDidNavigateToSamePage(rfh, params, navigation_handle); | 901 RendererDidNavigateToSamePage(rfh, params, navigation_handle); |
| 897 break; | 902 break; |
| 898 case NAVIGATION_TYPE_NEW_SUBFRAME: | 903 case NAVIGATION_TYPE_NEW_SUBFRAME: |
| 899 RendererDidNavigateNewSubframe(rfh, params, details->is_same_document, | 904 RendererDidNavigateNewSubframe(rfh, params, details->is_same_document, |
| 900 details->did_replace_entry); | 905 details->did_replace_entry); |
| 901 break; | 906 break; |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 DCHECK(pending_entry_index_ == -1 || | 2252 DCHECK(pending_entry_index_ == -1 || |
| 2248 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); | 2253 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); |
| 2249 } | 2254 } |
| 2250 | 2255 |
| 2251 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2256 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2252 const base::Callback<base::Time()>& get_timestamp_callback) { | 2257 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2253 get_timestamp_callback_ = get_timestamp_callback; | 2258 get_timestamp_callback_ = get_timestamp_callback; |
| 2254 } | 2259 } |
| 2255 | 2260 |
| 2256 } // namespace content | 2261 } // namespace content |
| OLD | NEW |