OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_UTILS_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_UTILS_H_ |
| 7 |
| 8 #include "chrome/browser/sessions/session_types.h" |
| 9 #include "chrome/browser/ui/browser.h" |
| 10 |
| 11 // Used to distinguish an application from a ordinary content window. |
| 12 enum AppType { |
| 13 TYPE_APP, |
| 14 TYPE_NORMAL |
| 15 }; |
| 16 |
| 17 // Returns true if a window of given |window_type| and |app_type| should get |
| 18 // restored upon session restore. |
| 19 bool ShouldRestoreWindowOfType(SessionWindow::WindowType type, |
| 20 AppType app_type); |
| 21 |
| 22 // Removes unrestorable windows from the previous windows list. |
| 23 void RemoveUnusedRestoreWindows(std::vector<SessionWindow*>* window_list); |
| 24 |
| 25 // Convert back/forward between the Browser and SessionService window types. |
| 26 SessionWindow::WindowType WindowTypeForBrowserType(Browser::Type type); |
| 27 Browser::Type BrowserTypeForWindowType(SessionWindow::WindowType type); |
| 28 |
| 29 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_UTILS_H_ |
OLD | NEW |