OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/chrome/browser/tabs/tab.h" | 5 #import "ios/chrome/browser/tabs/tab.h" |
6 | 6 |
7 #import <CoreLocation/CoreLocation.h> | 7 #import <CoreLocation/CoreLocation.h> |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 storeKitLauncher_.reset(storeKitLauncher); | 896 storeKitLauncher_.reset(storeKitLauncher); |
897 } | 897 } |
898 | 898 |
899 // Swap out the existing session history with a new list of navigations. Forces | 899 // Swap out the existing session history with a new list of navigations. Forces |
900 // the tab to reload to update the UI accordingly. This is ok because none of | 900 // the tab to reload to update the UI accordingly. This is ok because none of |
901 // the session history is stored in the tab; it's always fetched through the | 901 // the session history is stored in the tab; it's always fetched through the |
902 // navigation manager. | 902 // navigation manager. |
903 - (void)replaceHistoryWithNavigations: | 903 - (void)replaceHistoryWithNavigations: |
904 (const std::vector<sessions::SerializedNavigationEntry>&)navigations | 904 (const std::vector<sessions::SerializedNavigationEntry>&)navigations |
905 currentIndex:(NSInteger)currentIndex { | 905 currentIndex:(NSInteger)currentIndex { |
906 std::vector<std::unique_ptr<web::NavigationItem>> items = | 906 web::ScopedNavigationItemList items = |
907 sessions::IOSSerializedNavigationBuilder::ToNavigationItems(navigations); | 907 sessions::IOSSerializedNavigationBuilder::ToNavigationItems(navigations); |
908 [self navigationManagerImpl]->ReplaceSessionHistory(std::move(items), | 908 [self navigationManagerImpl]->ReplaceSessionHistory(std::move(items), |
909 currentIndex); | 909 currentIndex); |
910 [self didReplaceSessionHistory]; | 910 [self didReplaceSessionHistory]; |
911 | 911 |
912 [self.webController loadCurrentURL]; | 912 [self.webController loadCurrentURL]; |
913 } | 913 } |
914 | 914 |
915 - (void)didReplaceSessionHistory { | 915 - (void)didReplaceSessionHistory { |
916 // Replace fullScreenController_ with a new sessionID when the navigation | 916 // Replace fullScreenController_ with a new sessionID when the navigation |
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 | 2243 |
2244 - (TabModel*)parentTabModel { | 2244 - (TabModel*)parentTabModel { |
2245 return parentTabModel_; | 2245 return parentTabModel_; |
2246 } | 2246 } |
2247 | 2247 |
2248 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2248 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2249 return inputAccessoryViewController_.get(); | 2249 return inputAccessoryViewController_.get(); |
2250 } | 2250 } |
2251 | 2251 |
2252 @end | 2252 @end |
OLD | NEW |