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