OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 void BrowserClosed(TabRestoreServiceDelegate* delegate); | 139 void BrowserClosed(TabRestoreServiceDelegate* delegate); |
140 | 140 |
141 // Removes all entries from the list and notifies observers the list | 141 // Removes all entries from the list and notifies observers the list |
142 // of tabs has changed. | 142 // of tabs has changed. |
143 void ClearEntries(); | 143 void ClearEntries(); |
144 | 144 |
145 // Returns the entries, ordered with most recently closed entries at the | 145 // Returns the entries, ordered with most recently closed entries at the |
146 // front. | 146 // front. |
147 virtual const Entries& entries() const; | 147 virtual const Entries& entries() const; |
148 | 148 |
149 // Fill the passed list with the entries filtering out the ones that are on | |
150 // the same URL as a previous entry. This avoid filling the list with things | |
151 // that look like duplicates. A user can still access the filtered out version | |
152 // by restoring the one he sees as it will allow the older one to show. | |
153 void FilteredEntries(TabRestoreService::Entries* filteredEntries) const; | |
sky
2011/09/19 16:23:15
If this is only going to be used by RecentlyClosed
sky
2011/09/19 20:58:17
When you move this to a separate class make the me
noyau (Ping after 24h)
2011/09/20 15:46:58
This will be used in some other context. SessionUt
| |
154 | |
149 // Restores the most recently closed entry. Does nothing if there are no | 155 // Restores the most recently closed entry. Does nothing if there are no |
150 // entries to restore. If the most recently restored entry is a tab, it is | 156 // entries to restore. If the most recently restored entry is a tab, it is |
151 // added to |delegate|. | 157 // added to |delegate|. |
152 void RestoreMostRecentEntry(TabRestoreServiceDelegate* delegate); | 158 void RestoreMostRecentEntry(TabRestoreServiceDelegate* delegate); |
153 | 159 |
154 // Restores an entry by id. If there is no entry with an id matching |id|, | 160 // Restores an entry by id. If there is no entry with an id matching |id|, |
155 // this does nothing. If |replace_existing_tab| is true and id identifies a | 161 // this does nothing. If |replace_existing_tab| is true and id identifies a |
156 // tab, the newly created tab replaces the selected tab in |delegate|. If | 162 // tab, the newly created tab replaces the selected tab in |delegate|. If |
157 // |delegate| is NULL, this creates a new window for the entry. | 163 // |delegate| is NULL, this creates a new window for the entry. |
158 void RestoreEntryById(TabRestoreServiceDelegate* delegate, | 164 void RestoreEntryById(TabRestoreServiceDelegate* delegate, |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 // loading LoadStateChanged is invoked, which adds these entries to | 343 // loading LoadStateChanged is invoked, which adds these entries to |
338 // entries_. | 344 // entries_. |
339 std::vector<Entry*> staging_entries_; | 345 std::vector<Entry*> staging_entries_; |
340 | 346 |
341 TimeFactory* time_factory_; | 347 TimeFactory* time_factory_; |
342 | 348 |
343 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); | 349 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); |
344 }; | 350 }; |
345 | 351 |
346 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ | 352 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
OLD | NEW |