Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 2676063003: Set CRWSessionController's BrowserState when NavigationManger's is set. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/navigation/crw_session_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ios/web/navigation/crw_session_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698