Chromium Code Reviews| 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/basictypes.h" | 8 #include "base/basictypes.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 base::FilePath GetPathToSaveTo() override; | |
| 23 GURL GetNewTabURL() override; | |
| 22 bool HasLastSession() override; | 24 bool HasLastSession() override; |
| 23 void GetLastSession(const sessions::GetLastSessionCallback& callback, | 25 void GetLastSession(const sessions::GetLastSessionCallback& callback, |
| 24 base::CancelableTaskTracker* tracker) override; | 26 base::CancelableTaskTracker* tracker) override; |
| 27 void OnTabRestored(const GURL& url) override; | |
|
sky
2015/09/09 15:57:59
Is it possible to have the call sites do this book
blundell
2015/09/09 16:03:13
By "bookkeeping", are you referring to the body of
sky
2015/09/09 19:52:05
I was thinking more specifically if the places tha
| |
| 25 | 28 |
| 26 Profile* profile_; | 29 Profile* profile_; |
| 27 | 30 |
| 28 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient); | 31 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient); |
| 29 }; | 32 }; |
| 30 | 33 |
| 31 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ | 34 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ |
| OLD | NEW |