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

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

Issue 5705004: [SYNC] Sessions datatype refactor. Most things related to sessions under-the-... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sessions/session_id.h ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 20 matching lines...) Expand all
31 // 31 //
32 // If urls_to_open is non-empty, a tab is added for each of the URLs. 32 // If urls_to_open is non-empty, a tab is added for each of the URLs.
33 static void RestoreSession(Profile* profile, 33 static void RestoreSession(Profile* profile,
34 Browser* browser, 34 Browser* browser,
35 bool clobber_existing_window, 35 bool clobber_existing_window,
36 bool always_create_tabbed_browser, 36 bool always_create_tabbed_browser,
37 const std::vector<GURL>& urls_to_open); 37 const std::vector<GURL>& urls_to_open);
38 38
39 // Specifically used in the restoration of a foreign session. This method 39 // Specifically used in the restoration of a foreign session. This method
40 // restores the given session windows to a browser. 40 // restores the given session windows to a browser.
41 static void RestoreForeignSessionWindows(Profile* profile, 41 static void RestoreForeignSessionWindows(
42 std::vector<SessionWindow*>* windows); 42 Profile* profile,
43 std::vector<SessionWindow*>::const_iterator begin,
44 std::vector<SessionWindow*>::const_iterator end);
45
46 // Specifically used in the restoration of a foreign session. This method
47 // restores the given session tab to a browser.
48 static void RestoreForeignSessionTab(Profile* profile,
49 const SessionTab& tab);
43 50
44 // Synchronously restores the last session. At least one tabbed browser is 51 // Synchronously restores the last session. At least one tabbed browser is
45 // created, even if there is an error in restoring. 52 // created, even if there is an error in restoring.
46 // 53 //
47 // If urls_to_open is non-empty, a tab is added for each of the URLs. 54 // If urls_to_open is non-empty, a tab is added for each of the URLs.
48 static void RestoreSessionSynchronously( 55 static void RestoreSessionSynchronously(
49 Profile* profile, 56 Profile* profile,
50 const std::vector<GURL>& urls_to_open); 57 const std::vector<GURL>& urls_to_open);
51 58
52 // Returns true if we're in the process of restoring. 59 // Returns true if we're in the process of restoring.
53 static bool IsRestoring(); 60 static bool IsRestoring();
54 61
55 // The max number of non-selected tabs SessionRestore loads when restoring 62 // The max number of non-selected tabs SessionRestore loads when restoring
56 // a session. A value of 0 indicates all tabs are loaded at once. 63 // a session. A value of 0 indicates all tabs are loaded at once.
57 static size_t num_tabs_to_load_; 64 static size_t num_tabs_to_load_;
58 65
59 private: 66 private:
60 SessionRestore(); 67 SessionRestore();
61 68
62 DISALLOW_COPY_AND_ASSIGN(SessionRestore); 69 DISALLOW_COPY_AND_ASSIGN(SessionRestore);
63 }; 70 };
64 71
65 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ 72 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_id.h ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698