| 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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 | 1782 |
| 1783 // If an interstitial page is showing, the previous renderer is blocked and | 1783 // If an interstitial page is showing, the previous renderer is blocked and |
| 1784 // cannot make new requests. Unblock (and disable) it to allow this | 1784 // cannot make new requests. Unblock (and disable) it to allow this |
| 1785 // navigation to succeed. The interstitial will stay visible until the | 1785 // navigation to succeed. The interstitial will stay visible until the |
| 1786 // resulting DidNavigate. | 1786 // resulting DidNavigate. |
| 1787 if (delegate_->GetInterstitialPage()) { | 1787 if (delegate_->GetInterstitialPage()) { |
| 1788 static_cast<InterstitialPageImpl*>(delegate_->GetInterstitialPage())-> | 1788 static_cast<InterstitialPageImpl*>(delegate_->GetInterstitialPage())-> |
| 1789 CancelForNavigation(); | 1789 CancelForNavigation(); |
| 1790 } | 1790 } |
| 1791 | 1791 |
| 1792 // Convert Enter-in-omnibox to a reload. This is what Blink does in | |
| 1793 // FrameLoader, but we want to handle it here so that if the navigation is | |
| 1794 // redirected or handled purely on the browser side in PlzNavigate we have the | |
| 1795 // same behaviour as Blink would. Note that we don't want to convert to a | |
| 1796 // reload for history navigations, so this must be above the retrieval of the | |
| 1797 // pending_entry_ below when pending_entry_index_ is used. | |
| 1798 if (reload_type == ReloadType::NONE && GetLastCommittedEntry() && | |
| 1799 pending_entry_ && pending_entry_->frame_tree_node_id() == -1 && | |
| 1800 pending_entry_->GetURL() == GetLastCommittedEntry()->GetURL() && | |
| 1801 !pending_entry_->GetHasPostData() && | |
| 1802 // This check is required for Android WebView loadDataWithBaseURL. | |
| 1803 GetLastCommittedEntry()->GetVirtualURL() == | |
| 1804 pending_entry_->GetVirtualURL()) { | |
| 1805 reload_type = ReloadType::MAIN_RESOURCE; | |
| 1806 } | |
| 1807 | |
| 1808 // For session history navigations only the pending_entry_index_ is set. | 1792 // For session history navigations only the pending_entry_index_ is set. |
| 1809 if (!pending_entry_) { | 1793 if (!pending_entry_) { |
| 1810 CHECK_NE(pending_entry_index_, -1); | 1794 CHECK_NE(pending_entry_index_, -1); |
| 1811 pending_entry_ = entries_[pending_entry_index_].get(); | 1795 pending_entry_ = entries_[pending_entry_index_].get(); |
| 1812 } | 1796 } |
| 1813 | 1797 |
| 1814 // Any renderer-side debug URLs or javascript: URLs should be ignored if the | 1798 // Any renderer-side debug URLs or javascript: URLs should be ignored if the |
| 1815 // renderer process is not live, unless it is the initial navigation of the | 1799 // renderer process is not live, unless it is the initial navigation of the |
| 1816 // tab. | 1800 // tab. |
| 1817 if (IsRendererDebugURL(pending_entry_->GetURL())) { | 1801 if (IsRendererDebugURL(pending_entry_->GetURL())) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 } | 2084 } |
| 2101 } | 2085 } |
| 2102 } | 2086 } |
| 2103 | 2087 |
| 2104 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2088 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2105 const base::Callback<base::Time()>& get_timestamp_callback) { | 2089 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2106 get_timestamp_callback_ = get_timestamp_callback; | 2090 get_timestamp_callback_ = get_timestamp_callback; |
| 2107 } | 2091 } |
| 2108 | 2092 |
| 2109 } // namespace content | 2093 } // namespace content |
| OLD | NEW |