| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 [session_controller_ setNavigationManager:nullptr]; | 80 [session_controller_ setNavigationManager:nullptr]; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void NavigationManagerImpl::SetDelegate(NavigationManagerDelegate* delegate) { | 83 void NavigationManagerImpl::SetDelegate(NavigationManagerDelegate* delegate) { |
| 84 delegate_ = delegate; | 84 delegate_ = delegate; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void NavigationManagerImpl::SetBrowserState(BrowserState* browser_state) { | 87 void NavigationManagerImpl::SetBrowserState(BrowserState* browser_state) { |
| 88 browser_state_ = browser_state; | 88 browser_state_ = browser_state; |
| 89 [session_controller_ setBrowserState:browser_state]; |
| 89 } | 90 } |
| 90 | 91 |
| 91 void NavigationManagerImpl::SetSessionController( | 92 void NavigationManagerImpl::SetSessionController( |
| 92 CRWSessionController* session_controller) { | 93 CRWSessionController* session_controller) { |
| 93 session_controller_.reset(session_controller); | 94 session_controller_.reset(session_controller); |
| 94 [session_controller_ setNavigationManager:this]; | 95 [session_controller_ setNavigationManager:this]; |
| 95 } | 96 } |
| 96 | 97 |
| 97 void NavigationManagerImpl::InitializeSession(NSString* window_name, | 98 void NavigationManagerImpl::InitializeSession(NSString* window_name, |
| 98 NSString* opener_id, | 99 NSString* opener_id, |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 400 } |
| 400 | 401 |
| 401 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { | 402 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { |
| 402 DCHECK_GT(index, 0); | 403 DCHECK_GT(index, 0); |
| 403 DCHECK_LT(index, GetItemCount()); | 404 DCHECK_LT(index, GetItemCount()); |
| 404 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); | 405 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); |
| 405 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; | 406 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; |
| 406 } | 407 } |
| 407 | 408 |
| 408 } // namespace web | 409 } // namespace web |
| OLD | NEW |