Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/sessions/tab_restore_service.h

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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|. Returns 158 // it will be created on the desktop specified by |host_desktop_type|. Returns
159 // the WebContents of the restored tab(s). 159 // the WebContents of the restored tab(s).
160 virtual std::vector<content::WebContents*> RestoreMostRecentEntry( 160 virtual std::vector<content::WebContents*> RestoreMostRecentEntry(
161 TabRestoreServiceDelegate* delegate, 161 TabRestoreServiceDelegate* delegate,
162 chrome::HostDesktopType host_desktop_type) = 0; 162 ui::HostDesktopType host_desktop_type) = 0;
163 163
164 // Removes the Tab with id |id| from the list and returns it; ownership is 164 // Removes the Tab with id |id| from the list and returns it; ownership is
165 // passed to the caller. 165 // passed to the caller.
166 virtual Tab* RemoveTabEntryById(SessionID::id_type id) = 0; 166 virtual Tab* RemoveTabEntryById(SessionID::id_type id) = 0;
167 167
168 // Restores an entry by id. If there is no entry with an id matching |id|, 168 // Restores an entry by id. If there is no entry with an id matching |id|,
169 // this does nothing. If |delegate| is NULL, this creates a new window for the 169 // this does nothing. If |delegate| is NULL, this creates a new window for the
170 // entry. |disposition| is respected, but the attributes (tabstrip index, 170 // entry. |disposition| is respected, but the attributes (tabstrip index,
171 // browser window) of the tab when it was closed will be respected if 171 // browser window) of the tab when it was closed will be respected if
172 // disposition is UNKNOWN. If a new browser needs to be created for this 172 // disposition is UNKNOWN. If a new browser needs to be created for this
173 // entry, it will be created on the desktop specified by |host_desktop_type|. 173 // entry, it will be created on the desktop specified by |host_desktop_type|.
174 // Returns the WebContents of the restored tab(s). 174 // Returns the WebContents of the restored tab(s).
175 virtual std::vector<content::WebContents*> RestoreEntryById( 175 virtual std::vector<content::WebContents*> RestoreEntryById(
176 TabRestoreServiceDelegate* delegate, 176 TabRestoreServiceDelegate* delegate,
177 SessionID::id_type id, 177 SessionID::id_type id,
178 chrome::HostDesktopType host_desktop_type, 178 ui::HostDesktopType host_desktop_type,
179 WindowOpenDisposition disposition) = 0; 179 WindowOpenDisposition disposition) = 0;
180 180
181 // Loads the tabs and previous session. This does nothing if the tabs 181 // Loads the tabs and previous session. This does nothing if the tabs
182 // from the previous session have already been loaded. 182 // from the previous session have already been loaded.
183 virtual void LoadTabsFromLastSession() = 0; 183 virtual void LoadTabsFromLastSession() = 0;
184 184
185 // Returns true if the tab entries have been loaded. 185 // Returns true if the tab entries have been loaded.
186 virtual bool IsLoaded() const = 0; 186 virtual bool IsLoaded() const = 0;
187 187
188 // Deletes the last session. 188 // Deletes the last session.
189 virtual void DeleteLastSession() = 0; 189 virtual void DeleteLastSession() = 0;
190 }; 190 };
191 191
192 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 192 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698