| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 int index = GetEntryIndexWithPageID(instance, page_id); | 407 int index = GetEntryIndexWithPageID(instance, page_id); |
| 408 return (index != -1) ? entries_[index] : nullptr; | 408 return (index != -1) ? entries_[index] : nullptr; |
| 409 } | 409 } |
| 410 | 410 |
| 411 NavigationEntryImpl* | 411 NavigationEntryImpl* |
| 412 NavigationControllerImpl::GetEntryWithUniqueID(int nav_entry_id) const { | 412 NavigationControllerImpl::GetEntryWithUniqueID(int nav_entry_id) const { |
| 413 int index = GetEntryIndexWithUniqueID(nav_entry_id); | 413 int index = GetEntryIndexWithUniqueID(nav_entry_id); |
| 414 return (index != -1) ? entries_[index] : nullptr; | 414 return (index != -1) ? entries_[index] : nullptr; |
| 415 } | 415 } |
| 416 | 416 |
| 417 bool NavigationControllerImpl::HasCommittedRealLoad( | |
| 418 FrameTreeNode* frame_tree_node) const { | |
| 419 NavigationEntryImpl* last_committed = GetLastCommittedEntry(); | |
| 420 return last_committed && last_committed->GetFrameEntry(frame_tree_node); | |
| 421 } | |
| 422 | |
| 423 void NavigationControllerImpl::LoadEntry( | 417 void NavigationControllerImpl::LoadEntry( |
| 424 scoped_ptr<NavigationEntryImpl> entry) { | 418 scoped_ptr<NavigationEntryImpl> entry) { |
| 425 // When navigating to a new page, we don't know for sure if we will actually | 419 // When navigating to a new page, we don't know for sure if we will actually |
| 426 // end up leaving the current page. The new page load could for example | 420 // end up leaving the current page. The new page load could for example |
| 427 // result in a download or a 'no content' response (e.g., a mailto: URL). | 421 // result in a download or a 'no content' response (e.g., a mailto: URL). |
| 428 SetPendingEntry(entry.Pass()); | 422 SetPendingEntry(entry.Pass()); |
| 429 NavigateToPendingEntry(NO_RELOAD); | 423 NavigateToPendingEntry(NO_RELOAD); |
| 430 } | 424 } |
| 431 | 425 |
| 432 void NavigationControllerImpl::SetPendingEntry( | 426 void NavigationControllerImpl::SetPendingEntry( |
| (...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1988 } | 1982 } |
| 1989 } | 1983 } |
| 1990 } | 1984 } |
| 1991 | 1985 |
| 1992 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1986 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 1993 const base::Callback<base::Time()>& get_timestamp_callback) { | 1987 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 1994 get_timestamp_callback_ = get_timestamp_callback; | 1988 get_timestamp_callback_ = get_timestamp_callback; |
| 1995 } | 1989 } |
| 1996 | 1990 |
| 1997 } // namespace content | 1991 } // namespace content |
| OLD | NEW |