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 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h" | 5 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "components/sessions/core/session_types.h" | 12 #include "components/sessions/core/session_types.h" |
13 #include "components/sessions/ios/ios_serialized_navigation_builder.h" | 13 #include "components/sessions/ios/ios_serialized_navigation_builder.h" |
14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
15 #import "ios/chrome/browser/tabs/tab.h" | 15 #import "ios/chrome/browser/tabs/tab.h" |
16 #import "ios/chrome/browser/tabs/tab_model.h" | 16 #import "ios/chrome/browser/tabs/tab_model.h" |
17 #import "ios/chrome/browser/tabs/tab_model_list.h" | 17 #import "ios/chrome/browser/tabs/tab_model_list.h" |
18 #import "ios/shared/chrome/browser/tabs/web_state_list.h" | 18 #import "ios/chrome/browser/web_state_list/web_state_list.h" |
19 #import "ios/web/navigation/navigation_manager_impl.h" | 19 #import "ios/web/navigation/navigation_manager_impl.h" |
20 #include "ios/web/public/navigation_item.h" | 20 #include "ios/web/public/navigation_item.h" |
21 #import "ios/web/web_state/web_state_impl.h" | 21 #import "ios/web/web_state/web_state_impl.h" |
22 #import "net/base/mac/url_conversions.h" | 22 #import "net/base/mac/url_conversions.h" |
23 | 23 |
24 TabRestoreServiceDelegateImplIOS::TabRestoreServiceDelegateImplIOS( | 24 TabRestoreServiceDelegateImplIOS::TabRestoreServiceDelegateImplIOS( |
25 ios::ChromeBrowserState* browser_state) | 25 ios::ChromeBrowserState* browser_state) |
26 : browser_state_(browser_state) {} | 26 : browser_state_(browser_state) {} |
27 | 27 |
28 TabRestoreServiceDelegateImplIOS::~TabRestoreServiceDelegateImplIOS() {} | 28 TabRestoreServiceDelegateImplIOS::~TabRestoreServiceDelegateImplIOS() {} |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 Tab* tab = tab_model().currentTab; | 108 Tab* tab = tab_model().currentTab; |
109 [tab replaceHistoryWithNavigations:navigations | 109 [tab replaceHistoryWithNavigations:navigations |
110 currentIndex:selected_navigation]; | 110 currentIndex:selected_navigation]; |
111 return nullptr; | 111 return nullptr; |
112 } | 112 } |
113 | 113 |
114 void TabRestoreServiceDelegateImplIOS::CloseTab() { | 114 void TabRestoreServiceDelegateImplIOS::CloseTab() { |
115 WebStateList* web_state_list = [tab_model() webStateList]; | 115 WebStateList* web_state_list = [tab_model() webStateList]; |
116 web_state_list->CloseWebStateAt(web_state_list->active_index()); | 116 web_state_list->CloseWebStateAt(web_state_list->active_index()); |
117 } | 117 } |
OLD | NEW |