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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 [session_controller_ setNavigationManager:this]; | 94 [session_controller_ setNavigationManager:this]; |
95 } | 95 } |
96 | 96 |
97 void NavigationManagerImpl::InitializeSession(BOOL opened_by_dom) { | 97 void NavigationManagerImpl::InitializeSession(BOOL opened_by_dom) { |
98 SetSessionController([[CRWSessionController alloc] | 98 SetSessionController([[CRWSessionController alloc] |
99 initWithBrowserState:browser_state_ | 99 initWithBrowserState:browser_state_ |
100 openedByDOM:opened_by_dom]); | 100 openedByDOM:opened_by_dom]); |
101 } | 101 } |
102 | 102 |
103 void NavigationManagerImpl::ReplaceSessionHistory( | 103 void NavigationManagerImpl::ReplaceSessionHistory( |
104 std::vector<std::unique_ptr<web::NavigationItem>> items, | 104 web::ScopedNavigationItemList items, |
105 int current_index) { | 105 int current_index) { |
106 SetSessionController([[CRWSessionController alloc] | 106 SetSessionController([[CRWSessionController alloc] |
107 initWithBrowserState:browser_state_ | 107 initWithBrowserState:browser_state_ |
108 navigationItems:std::move(items) | 108 navigationItems:std::move(items) |
109 currentIndex:current_index]); | 109 currentIndex:current_index]); |
110 } | 110 } |
111 | 111 |
112 void NavigationManagerImpl::SetFacadeDelegate( | 112 void NavigationManagerImpl::SetFacadeDelegate( |
113 NavigationManagerFacadeDelegate* facade_delegate) { | 113 NavigationManagerFacadeDelegate* facade_delegate) { |
114 facade_delegate_ = facade_delegate; | 114 facade_delegate_ = facade_delegate; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 409 } |
410 | 410 |
411 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { | 411 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { |
412 DCHECK_GT(index, 0); | 412 DCHECK_GT(index, 0); |
413 DCHECK_LT(index, GetItemCount()); | 413 DCHECK_LT(index, GetItemCount()); |
414 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); | 414 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); |
415 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; | 415 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; |
416 } | 416 } |
417 | 417 |
418 } // namespace web | 418 } // namespace web |
OLD | NEW |