Chromium Code Reviews| 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 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1775 | 1775 |
| 1776 // If an interstitial page is showing, the previous renderer is blocked and | 1776 // If an interstitial page is showing, the previous renderer is blocked and |
| 1777 // cannot make new requests. Unblock (and disable) it to allow this | 1777 // cannot make new requests. Unblock (and disable) it to allow this |
| 1778 // navigation to succeed. The interstitial will stay visible until the | 1778 // navigation to succeed. The interstitial will stay visible until the |
| 1779 // resulting DidNavigate. | 1779 // resulting DidNavigate. |
| 1780 if (delegate_->GetInterstitialPage()) { | 1780 if (delegate_->GetInterstitialPage()) { |
| 1781 static_cast<InterstitialPageImpl*>(delegate_->GetInterstitialPage())-> | 1781 static_cast<InterstitialPageImpl*>(delegate_->GetInterstitialPage())-> |
| 1782 CancelForNavigation(); | 1782 CancelForNavigation(); |
| 1783 } | 1783 } |
| 1784 | 1784 |
| 1785 // Convert Enter-in-omnibox to a reload. This is what Blink does in | |
| 1786 // FrameLoader, but we want to handle it here so that if the navigation is | |
| 1787 // redirected or handled purely on the browser side in PlzNavigate we have the | |
| 1788 // same behaviour as Blink would. Note that we don't want to convert to a | |
| 1789 // reload for history navigations, so this must be above the retrieval of the | |
| 1790 // pending_entry_ below when pending_entry_index_ is used. | |
| 1791 if (reload_type == ReloadType::NONE && GetLastCommittedEntry() && | |
| 1792 pending_entry_ && pending_entry_->frame_tree_node_id() == -1 && | |
| 1793 pending_entry_->GetURL() == GetLastCommittedEntry()->GetURL() && | |
| 1794 !pending_entry_->GetHasPostData() && | |
| 1795 // Android uses data urls in WebViews. Skipping them here to see if | |
| 1796 // it fixes http://crbug.com/664319. Should we check for OS_ANDROID here? | |
| 1797 !pending_entry_->GetURL().SchemeIs(url::kDataScheme) && | |
|
Charlie Reis
2016/12/15 22:28:09
I like the idea of keeping essentially the same fi
ananta
2016/12/16 00:42:28
Thanks. I checked with boliu. He mentioned that th
| |
| 1798 // This check is required for Android WebView loadDataWithBaseURL. | |
| 1799 GetLastCommittedEntry()->GetVirtualURL() == | |
| 1800 pending_entry_->GetVirtualURL()) { | |
| 1801 reload_type = ReloadType::NORMAL; | |
| 1802 } | |
| 1803 | |
| 1785 // For session history navigations only the pending_entry_index_ is set. | 1804 // For session history navigations only the pending_entry_index_ is set. |
| 1786 if (!pending_entry_) { | 1805 if (!pending_entry_) { |
| 1787 CHECK_NE(pending_entry_index_, -1); | 1806 CHECK_NE(pending_entry_index_, -1); |
| 1788 pending_entry_ = entries_[pending_entry_index_].get(); | 1807 pending_entry_ = entries_[pending_entry_index_].get(); |
| 1789 } | 1808 } |
| 1790 | 1809 |
| 1791 // Any renderer-side debug URLs or javascript: URLs should be ignored if the | 1810 // Any renderer-side debug URLs or javascript: URLs should be ignored if the |
| 1792 // renderer process is not live, unless it is the initial navigation of the | 1811 // renderer process is not live, unless it is the initial navigation of the |
| 1793 // tab. | 1812 // tab. |
| 1794 if (IsRendererDebugURL(pending_entry_->GetURL())) { | 1813 if (IsRendererDebugURL(pending_entry_->GetURL())) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2077 } | 2096 } |
| 2078 } | 2097 } |
| 2079 } | 2098 } |
| 2080 | 2099 |
| 2081 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2100 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2082 const base::Callback<base::Time()>& get_timestamp_callback) { | 2101 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2083 get_timestamp_callback_ = get_timestamp_callback; | 2102 get_timestamp_callback_ = get_timestamp_callback; |
| 2084 } | 2103 } |
| 2085 | 2104 |
| 2086 } // namespace content | 2105 } // namespace content |
| OLD | NEW |