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_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 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 // of tabs has changed. | 148 // of tabs has changed. |
149 virtual void ClearEntries() = 0; | 149 virtual void ClearEntries() = 0; |
150 | 150 |
151 // Returns the entries, ordered with most recently closed entries at the | 151 // Returns the entries, ordered with most recently closed entries at the |
152 // front. | 152 // front. |
153 virtual const Entries& entries() const = 0; | 153 virtual const Entries& entries() const = 0; |
154 | 154 |
155 // 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 |
156 // 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 |
157 // added to |delegate|. If a new browser needs to be created for this entry, | 157 // added to |delegate|. If a new browser needs to be created for this entry, |
158 // it will be created on the desktop specified by |host_desktop_type|. | 158 // it will be created on the desktop specified by |host_desktop_type|. Returns |
159 virtual void RestoreMostRecentEntry( | 159 // the WebContents of the restored tab if entry is a Tab. In the case of |
160 // restoring type Window, returns the WebContents of the last successfully | |
sky
2013/08/01 00:05:43
Return value doesn't make sense here. SHouldn't th
Kristen Dwan
2013/08/02 20:54:19
Done.
| |
161 // restored tab in the window. | |
162 virtual content::WebContents* RestoreMostRecentEntry( | |
160 TabRestoreServiceDelegate* delegate, | 163 TabRestoreServiceDelegate* delegate, |
161 chrome::HostDesktopType host_desktop_type) = 0; | 164 chrome::HostDesktopType host_desktop_type) = 0; |
162 | 165 |
163 // Removes the Tab with id |id| from the list and returns it; ownership is | 166 // Removes the Tab with id |id| from the list and returns it; ownership is |
164 // passed to the caller. | 167 // passed to the caller. |
165 virtual Tab* RemoveTabEntryById(SessionID::id_type id) = 0; | 168 virtual Tab* RemoveTabEntryById(SessionID::id_type id) = 0; |
166 | 169 |
167 // Restores an entry by id. If there is no entry with an id matching |id|, | 170 // Restores an entry by id. If there is no entry with an id matching |id|, |
168 // this does nothing. If |delegate| is NULL, this creates a new window for the | 171 // this does nothing. If |delegate| is NULL, this creates a new window for the |
169 // entry. |disposition| is respected, but the attributes (tabstrip index, | 172 // entry. |disposition| is respected, but the attributes (tabstrip index, |
170 // browser window) of the tab when it was closed will be respected if | 173 // browser window) of the tab when it was closed will be respected if |
171 // disposition is UNKNOWN. If a new browser needs to be created for this | 174 // disposition is UNKNOWN. If a new browser needs to be created for this |
172 // entry, it will be created on the desktop specified by |host_desktop_type|. | 175 // entry, it will be created on the desktop specified by |host_desktop_type|. |
173 virtual void RestoreEntryById(TabRestoreServiceDelegate* delegate, | 176 // Returns the WebContents of the restored tab if entry is a Tab. In the case |
174 SessionID::id_type id, | 177 // of restoring type Window, returns the WebContents of the last successfully |
sky
2013/08/01 00:05:43
Same comment.
Kristen Dwan
2013/08/02 20:54:19
Done.
| |
175 chrome::HostDesktopType host_desktop_type, | 178 // restored tab in the window. |
176 WindowOpenDisposition disposition) = 0; | 179 virtual content::WebContents* RestoreEntryById( |
180 TabRestoreServiceDelegate* delegate, | |
181 SessionID::id_type id, | |
182 chrome::HostDesktopType host_desktop_type, | |
183 WindowOpenDisposition disposition) = 0; | |
177 | 184 |
178 // Loads the tabs and previous session. This does nothing if the tabs | 185 // Loads the tabs and previous session. This does nothing if the tabs |
179 // from the previous session have already been loaded. | 186 // from the previous session have already been loaded. |
180 virtual void LoadTabsFromLastSession() = 0; | 187 virtual void LoadTabsFromLastSession() = 0; |
181 | 188 |
182 // Returns true if the tab entries have been loaded. | 189 // Returns true if the tab entries have been loaded. |
183 virtual bool IsLoaded() const = 0; | 190 virtual bool IsLoaded() const = 0; |
184 | 191 |
185 // Deletes the last session. | 192 // Deletes the last session. |
186 virtual void DeleteLastSession() = 0; | 193 virtual void DeleteLastSession() = 0; |
187 }; | 194 }; |
188 | 195 |
189 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ | 196 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
OLD | NEW |