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 CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ |
6 #define CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ | 6 #define CHROME_BROWSER_SESSIONS_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 #include "ui/base/ui_base_types.h" |
| 11 #include "ui/gfx/geometry/rect.h" |
10 | 12 |
11 class Profile; | 13 class Profile; |
12 | 14 |
13 // ChromeTabRestoreServiceClient provides an implementation of | 15 // ChromeTabRestoreServiceClient provides an implementation of |
14 // TabRestoreServiceClient that depends on chrome/. | 16 // TabRestoreServiceClient that depends on chrome/. |
15 class ChromeTabRestoreServiceClient : public sessions::TabRestoreServiceClient { | 17 class ChromeTabRestoreServiceClient : public sessions::TabRestoreServiceClient { |
16 public: | 18 public: |
17 explicit ChromeTabRestoreServiceClient(Profile* profile); | 19 explicit ChromeTabRestoreServiceClient(Profile* profile); |
18 ~ChromeTabRestoreServiceClient() override; | 20 ~ChromeTabRestoreServiceClient() override; |
19 | 21 |
20 private: | 22 private: |
21 // TabRestoreServiceClient: | 23 // TabRestoreServiceClient: |
22 sessions::LiveTabContext* CreateLiveTabContext( | 24 sessions::LiveTabContext* CreateLiveTabContext( |
23 const std::string& app_name) override; | 25 const std::string& app_name, |
| 26 const gfx::Rect& bounds, |
| 27 ui::WindowShowState show_state, |
| 28 const std::string& workspace) override; |
24 sessions::LiveTabContext* FindLiveTabContextForTab( | 29 sessions::LiveTabContext* FindLiveTabContextForTab( |
25 const sessions::LiveTab* tab) override; | 30 const sessions::LiveTab* tab) override; |
26 sessions::LiveTabContext* FindLiveTabContextWithID( | 31 sessions::LiveTabContext* FindLiveTabContextWithID( |
27 SessionID::id_type desired_id) override; | 32 SessionID::id_type desired_id) override; |
28 bool ShouldTrackURLForRestore(const GURL& url) override; | 33 bool ShouldTrackURLForRestore(const GURL& url) override; |
29 std::string GetExtensionAppIDForTab(sessions::LiveTab* tab) override; | 34 std::string GetExtensionAppIDForTab(sessions::LiveTab* tab) override; |
30 base::SequencedWorkerPool* GetBlockingPool() override; | 35 base::SequencedWorkerPool* GetBlockingPool() override; |
31 base::FilePath GetPathToSaveTo() override; | 36 base::FilePath GetPathToSaveTo() override; |
32 GURL GetNewTabURL() override; | 37 GURL GetNewTabURL() override; |
33 bool HasLastSession() override; | 38 bool HasLastSession() override; |
34 void GetLastSession(const sessions::GetLastSessionCallback& callback, | 39 void GetLastSession(const sessions::GetLastSessionCallback& callback, |
35 base::CancelableTaskTracker* tracker) override; | 40 base::CancelableTaskTracker* tracker) override; |
36 void OnTabRestored(const GURL& url) override; | 41 void OnTabRestored(const GURL& url) override; |
37 | 42 |
38 Profile* profile_; | 43 Profile* profile_; |
39 | 44 |
40 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient); | 45 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient); |
41 }; | 46 }; |
42 | 47 |
43 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ | 48 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ |
OLD | NEW |