| 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_SESSION_RESTORE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // If |urls_to_open| is non-empty, a tab is added for each of the URLs. | 40 // If |urls_to_open| is non-empty, a tab is added for each of the URLs. |
| 41 static Browser* RestoreSession(Profile* profile, | 41 static Browser* RestoreSession(Profile* profile, |
| 42 Browser* browser, | 42 Browser* browser, |
| 43 uint32 behavior, | 43 uint32 behavior, |
| 44 const std::vector<GURL>& urls_to_open); | 44 const std::vector<GURL>& urls_to_open); |
| 45 | 45 |
| 46 // Specifically used in the restoration of a foreign session. This method | 46 // Specifically used in the restoration of a foreign session. This method |
| 47 // restores the given session windows to a browser. | 47 // restores the given session windows to a browser. |
| 48 static void RestoreForeignSessionWindows( | 48 static void RestoreForeignSessionWindows( |
| 49 Profile* profile, | 49 Profile* profile, |
| 50 std::vector<SessionWindow*>::const_iterator begin, | 50 std::vector<const SessionWindow*>::const_iterator begin, |
| 51 std::vector<SessionWindow*>::const_iterator end); | 51 std::vector<const SessionWindow*>::const_iterator end); |
| 52 | 52 |
| 53 // Specifically used in the restoration of a foreign session. This method | 53 // Specifically used in the restoration of a foreign session. This method |
| 54 // restores the given session tab to a browser. | 54 // restores the given session tab to a browser. |
| 55 static void RestoreForeignSessionTab(Profile* profile, | 55 static void RestoreForeignSessionTab(Profile* profile, |
| 56 const SessionTab& tab); | 56 const SessionTab& tab); |
| 57 | 57 |
| 58 // Returns true if we're in the process of restoring. | 58 // Returns true if we're in the process of restoring. |
| 59 static bool IsRestoring(); | 59 static bool IsRestoring(); |
| 60 | 60 |
| 61 // The max number of non-selected tabs SessionRestore loads when restoring | 61 // The max number of non-selected tabs SessionRestore loads when restoring |
| 62 // a session. A value of 0 indicates all tabs are loaded at once. | 62 // a session. A value of 0 indicates all tabs are loaded at once. |
| 63 static size_t num_tabs_to_load_; | 63 static size_t num_tabs_to_load_; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 SessionRestore(); | 66 SessionRestore(); |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(SessionRestore); | 68 DISALLOW_COPY_AND_ASSIGN(SessionRestore); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 71 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| OLD | NEW |