| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ | 5 #ifndef COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ |
| 6 #define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ | 6 #define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ~TabRestoreServiceHelper(); | 70 ~TabRestoreServiceHelper(); |
| 71 | 71 |
| 72 // Helper methods used to implement TabRestoreService. | 72 // Helper methods used to implement TabRestoreService. |
| 73 void AddObserver(TabRestoreServiceObserver* observer); | 73 void AddObserver(TabRestoreServiceObserver* observer); |
| 74 void RemoveObserver(TabRestoreServiceObserver* observer); | 74 void RemoveObserver(TabRestoreServiceObserver* observer); |
| 75 void CreateHistoricalTab(LiveTab* live_tab, int index); | 75 void CreateHistoricalTab(LiveTab* live_tab, int index); |
| 76 void BrowserClosing(LiveTabContext* context); | 76 void BrowserClosing(LiveTabContext* context); |
| 77 void BrowserClosed(LiveTabContext* context); | 77 void BrowserClosed(LiveTabContext* context); |
| 78 void ClearEntries(); | 78 void ClearEntries(); |
| 79 const Entries& entries() const; | 79 const Entries& entries() const; |
| 80 Entry* GetMostRecentEntry(); |
| 80 std::vector<LiveTab*> RestoreMostRecentEntry(LiveTabContext* context); | 81 std::vector<LiveTab*> RestoreMostRecentEntry(LiveTabContext* context); |
| 81 Tab* RemoveTabEntryById(SessionID::id_type id); | 82 Tab* RemoveTabEntryById(SessionID::id_type id); |
| 82 std::vector<LiveTab*> RestoreEntryById(LiveTabContext* context, | 83 std::vector<LiveTab*> RestoreEntryById(LiveTabContext* context, |
| 83 SessionID::id_type id, | 84 SessionID::id_type id, |
| 84 WindowOpenDisposition disposition); | 85 WindowOpenDisposition disposition); |
| 85 | 86 |
| 86 // Notifies observers the tabs have changed. | 87 // Notifies observers the tabs have changed. |
| 87 void NotifyTabsChanged(); | 88 void NotifyTabsChanged(); |
| 88 | 89 |
| 89 // Notifies observers the service has loaded. | 90 // Notifies observers the service has loaded. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 std::set<LiveTabContext*> closing_contexts_; | 177 std::set<LiveTabContext*> closing_contexts_; |
| 177 | 178 |
| 178 TimeFactory* const time_factory_; | 179 TimeFactory* const time_factory_; |
| 179 | 180 |
| 180 DISALLOW_COPY_AND_ASSIGN(TabRestoreServiceHelper); | 181 DISALLOW_COPY_AND_ASSIGN(TabRestoreServiceHelper); |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 } // namespace sessions | 184 } // namespace sessions |
| 184 | 185 |
| 185 #endif // COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ | 186 #endif // COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_HELPER_H_ |
| OLD | NEW |