| 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 #import "ios/web/navigation/navigation_manager_impl.h" | 5 #import "ios/web/navigation/navigation_manager_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 NavigationItemList NavigationManagerImpl::GetBackwardItems() const { | 332 NavigationItemList NavigationManagerImpl::GetBackwardItems() const { |
| 333 return [session_controller_ backwardItems]; | 333 return [session_controller_ backwardItems]; |
| 334 } | 334 } |
| 335 | 335 |
| 336 NavigationItemList NavigationManagerImpl::GetForwardItems() const { | 336 NavigationItemList NavigationManagerImpl::GetForwardItems() const { |
| 337 return [session_controller_ forwardItems]; | 337 return [session_controller_ forwardItems]; |
| 338 } | 338 } |
| 339 | 339 |
| 340 void NavigationManagerImpl::Reload(ReloadType reload_type, | 340 void NavigationManagerImpl::Reload(ReloadType reload_type, |
| 341 bool check_for_reposts) { | 341 bool check_for_reposts) { |
| 342 if (!GetTransientItem() && !GetPendingItem() && !GetLastCommittedItem()) |
| 343 return; |
| 344 |
| 342 delegate_->Reload(); | 345 delegate_->Reload(); |
| 343 } | 346 } |
| 344 | 347 |
| 345 void NavigationManagerImpl::CopyStateFromAndPrune( | 348 void NavigationManagerImpl::CopyStateFromAndPrune( |
| 346 const NavigationManager* manager) { | 349 const NavigationManager* manager) { |
| 347 DCHECK(manager); | 350 DCHECK(manager); |
| 348 CRWSessionController* other_session = | 351 CRWSessionController* other_session = |
| 349 static_cast<const NavigationManagerImpl*>(manager)->session_controller_; | 352 static_cast<const NavigationManagerImpl*>(manager)->session_controller_; |
| 350 [session_controller_ copyStateFromSessionControllerAndPrune:other_session]; | 353 [session_controller_ copyStateFromSessionControllerAndPrune:other_session]; |
| 351 } | 354 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 const ScopedNavigationItemImplList& items = [session_controller_ items]; | 452 const ScopedNavigationItemImplList& items = [session_controller_ items]; |
| 450 while (index >= 0) { | 453 while (index >= 0) { |
| 451 NavigationItem* item = items[index--].get(); | 454 NavigationItem* item = items[index--].get(); |
| 452 if (!client->IsAppSpecificURL(item->GetVirtualURL())) | 455 if (!client->IsAppSpecificURL(item->GetVirtualURL())) |
| 453 return item; | 456 return item; |
| 454 } | 457 } |
| 455 return nullptr; | 458 return nullptr; |
| 456 } | 459 } |
| 457 | 460 |
| 458 } // namespace web | 461 } // namespace web |
| OLD | NEW |