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

Side by Side Diff: ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.cc

Issue 1697183003: Remove HostDesktopType from sessions and tab restore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-19
Patch Set: mac Created 4 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/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ios_chrome_tab_restore_service_client.h" 5 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h"
6 6
7 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 7 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
8 #include "ios/chrome/browser/chrome_url_constants.h" 8 #include "ios/chrome/browser/chrome_url_constants.h"
9 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 9 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
10 #include "ios/public/provider/chrome/browser/sessions/live_tab_context_provider. h" 10 #include "ios/public/provider/chrome/browser/sessions/live_tab_context_provider. h"
11 #include "ios/web/public/web_thread.h" 11 #include "ios/web/public/web_thread.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 IOSChromeTabRestoreServiceClient::IOSChromeTabRestoreServiceClient( 14 IOSChromeTabRestoreServiceClient::IOSChromeTabRestoreServiceClient(
15 ios::ChromeBrowserState* browser_state) 15 ios::ChromeBrowserState* browser_state)
16 : browser_state_(browser_state) {} 16 : browser_state_(browser_state) {}
17 17
18 IOSChromeTabRestoreServiceClient::~IOSChromeTabRestoreServiceClient() {} 18 IOSChromeTabRestoreServiceClient::~IOSChromeTabRestoreServiceClient() {}
19 19
20 sessions::LiveTabContext* 20 sessions::LiveTabContext*
21 IOSChromeTabRestoreServiceClient::CreateLiveTabContext( 21 IOSChromeTabRestoreServiceClient::CreateLiveTabContext(
22 int host_desktop_type,
23 const std::string& app_name) { 22 const std::string& app_name) {
24 return ios::GetChromeBrowserProvider()->GetLiveTabContextProvider()->Create( 23 return ios::GetChromeBrowserProvider()->GetLiveTabContextProvider()->Create(
25 browser_state_); 24 browser_state_);
26 } 25 }
27 26
28 sessions::LiveTabContext* 27 sessions::LiveTabContext*
29 IOSChromeTabRestoreServiceClient::FindLiveTabContextForTab( 28 IOSChromeTabRestoreServiceClient::FindLiveTabContextForTab(
30 const sessions::LiveTab* tab) { 29 const sessions::LiveTab* tab) {
31 return ios::GetChromeBrowserProvider() 30 return ios::GetChromeBrowserProvider()
32 ->GetLiveTabContextProvider() 31 ->GetLiveTabContextProvider()
33 ->FindContextForTab(tab); 32 ->FindContextForTab(tab);
34 } 33 }
35 34
36 sessions::LiveTabContext* 35 sessions::LiveTabContext*
37 IOSChromeTabRestoreServiceClient::FindLiveTabContextWithID( 36 IOSChromeTabRestoreServiceClient::FindLiveTabContextWithID(
38 SessionID::id_type desired_id, 37 SessionID::id_type desired_id) {
39 int host_desktop_type) {
40 return ios::GetChromeBrowserProvider() 38 return ios::GetChromeBrowserProvider()
41 ->GetLiveTabContextProvider() 39 ->GetLiveTabContextProvider()
42 ->FindContextWithID(desired_id); 40 ->FindContextWithID(desired_id);
43 } 41 }
44 42
45 bool IOSChromeTabRestoreServiceClient::ShouldTrackURLForRestore( 43 bool IOSChromeTabRestoreServiceClient::ShouldTrackURLForRestore(
46 const GURL& url) { 44 const GURL& url) {
47 // NOTE: In the //chrome client, chrome://quit and chrome://restart are 45 // NOTE: In the //chrome client, chrome://quit and chrome://restart are
48 // blacklisted from being tracked to avoid entering infinite loops. However, 46 // blacklisted from being tracked to avoid entering infinite loops. However,
49 // iOS intentionally does not support those URLs, so there is no need to 47 // iOS intentionally does not support those URLs, so there is no need to
(...skipping 24 matching lines...) Expand all
74 72
75 bool IOSChromeTabRestoreServiceClient::HasLastSession() { 73 bool IOSChromeTabRestoreServiceClient::HasLastSession() {
76 return false; 74 return false;
77 } 75 }
78 76
79 void IOSChromeTabRestoreServiceClient::GetLastSession( 77 void IOSChromeTabRestoreServiceClient::GetLastSession(
80 const sessions::GetLastSessionCallback& callback, 78 const sessions::GetLastSessionCallback& callback,
81 base::CancelableTaskTracker* tracker) { 79 base::CancelableTaskTracker* tracker) {
82 NOTREACHED(); 80 NOTREACHED();
83 } 81 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698