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

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

Issue 2720983002: Remove windowName from CRWSessionController. (Closed)
Patch Set: Address comments. Created 3 years, 9 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
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 browser_state_ = browser_state; 87 browser_state_ = browser_state;
88 [session_controller_ setBrowserState:browser_state]; 88 [session_controller_ setBrowserState:browser_state];
89 } 89 }
90 90
91 void NavigationManagerImpl::SetSessionController( 91 void NavigationManagerImpl::SetSessionController(
92 CRWSessionController* session_controller) { 92 CRWSessionController* session_controller) {
93 session_controller_.reset(session_controller); 93 session_controller_.reset(session_controller);
94 [session_controller_ setNavigationManager:this]; 94 [session_controller_ setNavigationManager:this];
95 } 95 }
96 96
97 void NavigationManagerImpl::InitializeSession(NSString* window_name, 97 void NavigationManagerImpl::InitializeSession(BOOL opened_by_dom) {
98 BOOL opened_by_dom) {
99 SetSessionController([[CRWSessionController alloc] 98 SetSessionController([[CRWSessionController alloc]
100 initWithWindowName:window_name 99 initWithBrowserState:browser_state_
101 openedByDOM:opened_by_dom 100 openedByDOM:opened_by_dom]);
102 browserState:browser_state_]);
103 } 101 }
104 102
105 void NavigationManagerImpl::ReplaceSessionHistory( 103 void NavigationManagerImpl::ReplaceSessionHistory(
106 std::vector<std::unique_ptr<web::NavigationItem>> items, 104 std::vector<std::unique_ptr<web::NavigationItem>> items,
107 int current_index) { 105 int current_index) {
108 SetSessionController([[CRWSessionController alloc] 106 SetSessionController([[CRWSessionController alloc]
109 initWithNavigationItems:std::move(items) 107 initWithBrowserState:browser_state_
110 currentIndex:current_index 108 navigationItems:std::move(items)
111 browserState:browser_state_]); 109 currentIndex:current_index]);
112 } 110 }
113 111
114 void NavigationManagerImpl::SetFacadeDelegate( 112 void NavigationManagerImpl::SetFacadeDelegate(
115 NavigationManagerFacadeDelegate* facade_delegate) { 113 NavigationManagerFacadeDelegate* facade_delegate) {
116 facade_delegate_ = facade_delegate; 114 facade_delegate_ = facade_delegate;
117 } 115 }
118 116
119 NavigationManagerFacadeDelegate* NavigationManagerImpl::GetFacadeDelegate() 117 NavigationManagerFacadeDelegate* NavigationManagerImpl::GetFacadeDelegate()
120 const { 118 const {
121 return facade_delegate_; 119 return facade_delegate_;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 409 }
412 410
413 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const { 411 bool NavigationManagerImpl::IsRedirectItemAtIndex(int index) const {
414 DCHECK_GT(index, 0); 412 DCHECK_GT(index, 0);
415 DCHECK_LT(index, GetItemCount()); 413 DCHECK_LT(index, GetItemCount());
416 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType(); 414 ui::PageTransition transition = GetItemAtIndex(index)->GetTransitionType();
417 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK; 415 return transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK;
418 } 416 }
419 417
420 } // namespace web 418 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/navigation/navigation_manager_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698