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

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

Issue 2868983003: Ensure History > Recent Tabs restore preserves window disposition. (Closed)
Patch Set: Remove NOTREACHED(). Created 3 years, 4 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 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 #ifndef IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 5 #ifndef IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
6 #define IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 6 #define IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/sessions/core/tab_restore_service_client.h" 9 #include "components/sessions/core/tab_restore_service_client.h"
10 10
11 namespace ios { 11 namespace ios {
12 class ChromeBrowserState; 12 class ChromeBrowserState;
13 } 13 }
14 14
15 // IOSChromeTabRestoreServiceClient provides an implementation of 15 // IOSChromeTabRestoreServiceClient provides an implementation of
16 // TabRestoreServiceClient that depends on ios/chrome/. 16 // TabRestoreServiceClient that depends on ios/chrome/.
17 class IOSChromeTabRestoreServiceClient 17 class IOSChromeTabRestoreServiceClient
18 : public sessions::TabRestoreServiceClient { 18 : public sessions::TabRestoreServiceClient {
19 public: 19 public:
20 explicit IOSChromeTabRestoreServiceClient( 20 explicit IOSChromeTabRestoreServiceClient(
21 ios::ChromeBrowserState* browser_state); 21 ios::ChromeBrowserState* browser_state);
22 ~IOSChromeTabRestoreServiceClient() override; 22 ~IOSChromeTabRestoreServiceClient() override;
23 23
24 private: 24 private:
25 // TabRestoreServiceClient: 25 // TabRestoreServiceClient:
26 sessions::LiveTabContext* CreateLiveTabContext( 26 sessions::LiveTabContext* CreateLiveTabContext(
27 const std::string& app_name) override; 27 const std::string& app_name,
28 const gfx::Rect& bounds,
29 ui::WindowShowState show_state,
30 const std::string& workspace) override;
28 sessions::LiveTabContext* FindLiveTabContextForTab( 31 sessions::LiveTabContext* FindLiveTabContextForTab(
29 const sessions::LiveTab* tab) override; 32 const sessions::LiveTab* tab) override;
30 sessions::LiveTabContext* FindLiveTabContextWithID( 33 sessions::LiveTabContext* FindLiveTabContextWithID(
31 SessionID::id_type desired_id) override; 34 SessionID::id_type desired_id) override;
32 bool ShouldTrackURLForRestore(const GURL& url) override; 35 bool ShouldTrackURLForRestore(const GURL& url) override;
33 std::string GetExtensionAppIDForTab(sessions::LiveTab* tab) override; 36 std::string GetExtensionAppIDForTab(sessions::LiveTab* tab) override;
34 base::FilePath GetPathToSaveTo() override; 37 base::FilePath GetPathToSaveTo() override;
35 GURL GetNewTabURL() override; 38 GURL GetNewTabURL() override;
36 bool HasLastSession() override; 39 bool HasLastSession() override;
37 void GetLastSession(const sessions::GetLastSessionCallback& callback, 40 void GetLastSession(const sessions::GetLastSessionCallback& callback,
38 base::CancelableTaskTracker* tracker) override; 41 base::CancelableTaskTracker* tracker) override;
39 42
40 ios::ChromeBrowserState* browser_state_; 43 ios::ChromeBrowserState* browser_state_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(IOSChromeTabRestoreServiceClient); 45 DISALLOW_COPY_AND_ASSIGN(IOSChromeTabRestoreServiceClient);
43 }; 46 };
44 47
45 #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 48 #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698