OLD | NEW |
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::SequencedWorkerPool* GetBlockingPool() override; | 37 base::SequencedWorkerPool* GetBlockingPool() override; |
35 base::FilePath GetPathToSaveTo() override; | 38 base::FilePath GetPathToSaveTo() override; |
36 GURL GetNewTabURL() override; | 39 GURL GetNewTabURL() override; |
37 bool HasLastSession() override; | 40 bool HasLastSession() override; |
38 void GetLastSession(const sessions::GetLastSessionCallback& callback, | 41 void GetLastSession(const sessions::GetLastSessionCallback& callback, |
39 base::CancelableTaskTracker* tracker) override; | 42 base::CancelableTaskTracker* tracker) override; |
40 | 43 |
41 ios::ChromeBrowserState* browser_state_; | 44 ios::ChromeBrowserState* browser_state_; |
42 | 45 |
43 DISALLOW_COPY_AND_ASSIGN(IOSChromeTabRestoreServiceClient); | 46 DISALLOW_COPY_AND_ASSIGN(IOSChromeTabRestoreServiceClient); |
44 }; | 47 }; |
45 | 48 |
46 #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ | 49 #endif // IOS_CHROME_BROWSER_SESSIONS_IOS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ |
OLD | NEW |