| 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_TAB_RESTORE_SERVICE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_HELPER_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_HELPER_H_ | 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_HELPER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 chrome::HostDesktopType host_desktop_type); | 83 chrome::HostDesktopType host_desktop_type); |
| 84 Tab* RemoveTabEntryById(SessionID::id_type id); | 84 Tab* RemoveTabEntryById(SessionID::id_type id); |
| 85 void RestoreEntryById(TabRestoreServiceDelegate* delegate, | 85 void RestoreEntryById(TabRestoreServiceDelegate* delegate, |
| 86 SessionID::id_type id, | 86 SessionID::id_type id, |
| 87 chrome::HostDesktopType host_desktop_type, | 87 chrome::HostDesktopType host_desktop_type, |
| 88 WindowOpenDisposition disposition); | 88 WindowOpenDisposition disposition); |
| 89 | 89 |
| 90 // Notifies observers the tabs have changed. | 90 // Notifies observers the tabs have changed. |
| 91 void NotifyTabsChanged(); | 91 void NotifyTabsChanged(); |
| 92 | 92 |
| 93 // Notifies observers the service has loaded. |
| 94 void NotifyLoaded(); |
| 95 |
| 93 // Adds |entry| to the list of entries and takes ownership. If |prune| is true | 96 // Adds |entry| to the list of entries and takes ownership. If |prune| is true |
| 94 // |PruneAndNotify| is invoked. If |to_front| is true the entry is added to | 97 // |PruneAndNotify| is invoked. If |to_front| is true the entry is added to |
| 95 // the front, otherwise the back. Normal closes go to the front, but | 98 // the front, otherwise the back. Normal closes go to the front, but |
| 96 // tab/window closes from the previous session are added to the back. | 99 // tab/window closes from the previous session are added to the back. |
| 97 void AddEntry(Entry* entry, bool prune, bool to_front); | 100 void AddEntry(Entry* entry, bool prune, bool to_front); |
| 98 | 101 |
| 99 // Prunes |entries_| to contain only kMaxEntries, and removes uninteresting | 102 // Prunes |entries_| to contain only kMaxEntries, and removes uninteresting |
| 100 // entries. | 103 // entries. |
| 101 void PruneEntries(); | 104 void PruneEntries(); |
| 102 | 105 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // corresponding BrowserClosed. We cache the set of delegates closing to | 179 // corresponding BrowserClosed. We cache the set of delegates closing to |
| 177 // avoid creating historical tabs for them. | 180 // avoid creating historical tabs for them. |
| 178 std::set<TabRestoreServiceDelegate*> closing_delegates_; | 181 std::set<TabRestoreServiceDelegate*> closing_delegates_; |
| 179 | 182 |
| 180 TimeFactory* const time_factory_; | 183 TimeFactory* const time_factory_; |
| 181 | 184 |
| 182 DISALLOW_COPY_AND_ASSIGN(TabRestoreServiceHelper); | 185 DISALLOW_COPY_AND_ASSIGN(TabRestoreServiceHelper); |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_HELPER_H_ | 188 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_HELPER_H_ |
| OLD | NEW |