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 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1873 // will force the throbber to start, but WebKit will essentially ignore the | 1873 // will force the throbber to start, but WebKit will essentially ignore the |
1874 // navigation, and won't send a message to stop the throbber. To prevent this | 1874 // navigation, and won't send a message to stop the throbber. To prevent this |
1875 // from happening, we drop the navigation here and stop the slow-to-commit | 1875 // from happening, we drop the navigation here and stop the slow-to-commit |
1876 // page from loading (which would normally happen during the navigation). | 1876 // page from loading (which would normally happen during the navigation). |
1877 if (pending_entry_index_ != -1 && | 1877 if (pending_entry_index_ != -1 && |
1878 pending_entry_index_ == last_committed_entry_index_ && | 1878 pending_entry_index_ == last_committed_entry_index_ && |
1879 pending_entry_->restore_type() == RestoreType::NONE && | 1879 pending_entry_->restore_type() == RestoreType::NONE && |
1880 pending_entry_->GetTransitionType() & ui::PAGE_TRANSITION_FORWARD_BACK) { | 1880 pending_entry_->GetTransitionType() & ui::PAGE_TRANSITION_FORWARD_BACK) { |
1881 delegate_->Stop(); | 1881 delegate_->Stop(); |
1882 | 1882 |
1883 // If an interstitial page is showing, we want to close it to get back | 1883 // If an interstitial page is showing, we want to close it to get back |
Charlie Reis
2017/06/21 06:02:31
"is showing or is about to show"?
(It's worth clar
| |
1884 // to what was showing before. | 1884 // to what was showing before. |
1885 if (delegate_->GetInterstitialPage()) | 1885 InterstitialPage* interstitial = |
1886 delegate_->GetInterstitialPage()->DontProceed(); | 1886 InterstitialPage::GetInterstitialPage(GetWebContents()); |
1887 if (interstitial) | |
1888 interstitial->DontProceed(); | |
1887 | 1889 |
1888 DiscardNonCommittedEntries(); | 1890 DiscardNonCommittedEntries(); |
1889 return; | 1891 return; |
1890 } | 1892 } |
1891 | 1893 |
1892 // If an interstitial page is showing, the previous renderer is blocked and | 1894 // If an interstitial page is showing, the previous renderer is blocked and |
1893 // cannot make new requests. Unblock (and disable) it to allow this | 1895 // cannot make new requests. Unblock (and disable) it to allow this |
1894 // navigation to succeed. The interstitial will stay visible until the | 1896 // navigation to succeed. The interstitial will stay visible until the |
1895 // resulting DidNavigate. | 1897 // resulting DidNavigate. |
1896 if (delegate_->GetInterstitialPage()) { | 1898 if (delegate_->GetInterstitialPage()) { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2234 DCHECK(pending_entry_index_ == -1 || | 2236 DCHECK(pending_entry_index_ == -1 || |
2235 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); | 2237 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); |
2236 } | 2238 } |
2237 | 2239 |
2238 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2240 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2239 const base::Callback<base::Time()>& get_timestamp_callback) { | 2241 const base::Callback<base::Time()>& get_timestamp_callback) { |
2240 get_timestamp_callback_ = get_timestamp_callback; | 2242 get_timestamp_callback_ = get_timestamp_callback; |
2241 } | 2243 } |
2242 | 2244 |
2243 } // namespace content | 2245 } // namespace content |
OLD | NEW |