OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_model_closing_web_state_observer.h" | 5 #import "ios/chrome/browser/tabs/tab_model_closing_web_state_observer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
9 #include "components/sessions/core/tab_restore_service.h" | 9 #include "components/sessions/core/tab_restore_service.h" |
10 #include "components/sessions/ios/ios_live_tab.h" | 10 #include "components/sessions/ios/ios_live_tab.h" |
11 #include "ios/chrome/browser/chrome_url_constants.h" | 11 #include "ios/chrome/browser/chrome_url_constants.h" |
12 #import "ios/chrome/browser/tabs/legacy_tab_helper.h" | 12 #import "ios/chrome/browser/tabs/legacy_tab_helper.h" |
13 #import "ios/chrome/browser/tabs/tab.h" | 13 #import "ios/chrome/browser/tabs/tab.h" |
14 #import "ios/chrome/browser/tabs/tab_model.h" | 14 #import "ios/chrome/browser/tabs/tab_model.h" |
15 #import "ios/chrome/browser/tabs/tab_private.h" | 15 #import "ios/chrome/browser/tabs/tab_private.h" |
16 #import "ios/chrome/browser/web_state_list/web_state_list.h" | 16 #import "ios/shared/chrome/browser/tabs/web_state_list.h" |
17 #import "ios/web/public/navigation_item.h" | 17 #import "ios/web/public/navigation_item.h" |
18 #import "ios/web/public/navigation_manager.h" | 18 #import "ios/web/public/navigation_manager.h" |
19 #import "ios/web/public/web_state/web_state.h" | 19 #import "ios/web/public/web_state/web_state.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 #if !defined(__has_feature) || !__has_feature(objc_arc) | 22 #if !defined(__has_feature) || !__has_feature(objc_arc) |
23 #error "This file requires ARC support." | 23 #error "This file requires ARC support." |
24 #endif | 24 #endif |
25 | 25 |
26 @implementation TabModelClosingWebStateObserver { | 26 @implementation TabModelClosingWebStateObserver { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const base::StringPiece host = item->GetVirtualURL().host_piece(); | 80 const base::StringPiece host = item->GetVirtualURL().host_piece(); |
81 if (host == kChromeUINewTabHost || host == kChromeUIBookmarksHost) | 81 if (host == kChromeUINewTabHost || host == kChromeUIBookmarksHost) |
82 return; | 82 return; |
83 } | 83 } |
84 | 84 |
85 _restoreService->CreateHistoricalTab( | 85 _restoreService->CreateHistoricalTab( |
86 sessions::IOSLiveTab::GetForWebState(webState), atIndex); | 86 sessions::IOSLiveTab::GetForWebState(webState), atIndex); |
87 } | 87 } |
88 | 88 |
89 @end | 89 @end |
OLD | NEW |