| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // TabRestoreService: | 30 // TabRestoreService: |
| 31 void AddObserver(TabRestoreServiceObserver* observer) override; | 31 void AddObserver(TabRestoreServiceObserver* observer) override; |
| 32 void RemoveObserver(TabRestoreServiceObserver* observer) override; | 32 void RemoveObserver(TabRestoreServiceObserver* observer) override; |
| 33 void CreateHistoricalTab(content::WebContents* contents, int index) override; | 33 void CreateHistoricalTab(content::WebContents* contents, int index) override; |
| 34 void BrowserClosing(TabRestoreServiceDelegate* delegate) override; | 34 void BrowserClosing(TabRestoreServiceDelegate* delegate) override; |
| 35 void BrowserClosed(TabRestoreServiceDelegate* delegate) override; | 35 void BrowserClosed(TabRestoreServiceDelegate* delegate) override; |
| 36 void ClearEntries() override; | 36 void ClearEntries() override; |
| 37 const Entries& entries() const override; | 37 const Entries& entries() const override; |
| 38 std::vector<content::WebContents*> RestoreMostRecentEntry( | 38 std::vector<content::WebContents*> RestoreMostRecentEntry( |
| 39 TabRestoreServiceDelegate* delegate, | 39 TabRestoreServiceDelegate* delegate, |
| 40 chrome::HostDesktopType host_desktop_type) override; | 40 ui::HostDesktopType host_desktop_type) override; |
| 41 Tab* RemoveTabEntryById(SessionID::id_type id) override; | 41 Tab* RemoveTabEntryById(SessionID::id_type id) override; |
| 42 std::vector<content::WebContents*> RestoreEntryById( | 42 std::vector<content::WebContents*> RestoreEntryById( |
| 43 TabRestoreServiceDelegate* delegate, | 43 TabRestoreServiceDelegate* delegate, |
| 44 SessionID::id_type id, | 44 SessionID::id_type id, |
| 45 chrome::HostDesktopType host_desktop_type, | 45 ui::HostDesktopType host_desktop_type, |
| 46 WindowOpenDisposition disposition) override; | 46 WindowOpenDisposition disposition) override; |
| 47 void LoadTabsFromLastSession() override; | 47 void LoadTabsFromLastSession() override; |
| 48 bool IsLoaded() const override; | 48 bool IsLoaded() const override; |
| 49 void DeleteLastSession() override; | 49 void DeleteLastSession() override; |
| 50 void Shutdown() override; | 50 void Shutdown() override; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 friend class PersistentTabRestoreServiceTest; | 53 friend class PersistentTabRestoreServiceTest; |
| 54 | 54 |
| 55 class Delegate; | 55 class Delegate; |
| 56 | 56 |
| 57 // Exposed for testing. | 57 // Exposed for testing. |
| 58 Entries* mutable_entries(); | 58 Entries* mutable_entries(); |
| 59 void PruneEntries(); | 59 void PruneEntries(); |
| 60 | 60 |
| 61 scoped_ptr<sessions::TabRestoreServiceClient> client_; | 61 scoped_ptr<sessions::TabRestoreServiceClient> client_; |
| 62 scoped_ptr<Delegate> delegate_; | 62 scoped_ptr<Delegate> delegate_; |
| 63 TabRestoreServiceHelper helper_; | 63 TabRestoreServiceHelper helper_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); | 65 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 68 #endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| OLD | NEW |