| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 int opener_navigation_index) { | 98 int opener_navigation_index) { |
| 99 SetSessionController([[CRWSessionController alloc] | 99 SetSessionController([[CRWSessionController alloc] |
| 100 initWithWindowName:window_name | 100 initWithWindowName:window_name |
| 101 openerId:opener_id | 101 openerId:opener_id |
| 102 openedByDOM:opened_by_dom | 102 openedByDOM:opened_by_dom |
| 103 openerNavigationIndex:opener_navigation_index | 103 openerNavigationIndex:opener_navigation_index |
| 104 browserState:browser_state_]); | 104 browserState:browser_state_]); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void NavigationManagerImpl::ReplaceSessionHistory( | 107 void NavigationManagerImpl::ReplaceSessionHistory( |
| 108 ScopedVector<web::NavigationItem> items, | 108 std::vector<std::unique_ptr<web::NavigationItem>> items, |
| 109 int current_index) { | 109 int current_index) { |
| 110 SetSessionController([[CRWSessionController alloc] | 110 SetSessionController([[CRWSessionController alloc] |
| 111 initWithNavigationItems:std::move(items) | 111 initWithNavigationItems:std::move(items) |
| 112 currentIndex:current_index | 112 currentIndex:current_index |
| 113 browserState:browser_state_]); | 113 browserState:browser_state_]); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void NavigationManagerImpl::SetFacadeDelegate( | 116 void NavigationManagerImpl::SetFacadeDelegate( |
| 117 NavigationManagerFacadeDelegate* facade_delegate) { | 117 NavigationManagerFacadeDelegate* facade_delegate) { |
| 118 facade_delegate_ = facade_delegate; | 118 facade_delegate_ = facade_delegate; |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { | 399 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { |
| 400 DCHECK_GT(index, 0); | 400 DCHECK_GT(index, 0); |
| 401 DCHECK_LT(index, GetItemCount()); | 401 DCHECK_LT(index, GetItemCount()); |
| 402 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); | 402 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); |
| 403 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; | 403 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace web | 406 } // namespace web |
| OLD | NEW |