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

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

Issue 36473002: Foreign session pages now load into current tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/sessions/OWNERS ('k') | chrome/browser/sessions/session_restore_android.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) 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_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 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // the created Browsers. 58 // the created Browsers.
59 static std::vector<Browser*> RestoreForeignSessionWindows( 59 static std::vector<Browser*> RestoreForeignSessionWindows(
60 Profile* profile, 60 Profile* profile,
61 chrome::HostDesktopType host_desktop_type, 61 chrome::HostDesktopType host_desktop_type,
62 std::vector<const SessionWindow*>::const_iterator begin, 62 std::vector<const SessionWindow*>::const_iterator begin,
63 std::vector<const SessionWindow*>::const_iterator end); 63 std::vector<const SessionWindow*>::const_iterator end);
64 64
65 // Specifically used in the restoration of a foreign session. This method 65 // Specifically used in the restoration of a foreign session. This method
66 // restores the given session tab to the browser of |source_web_contents| if 66 // restores the given session tab to the browser of |source_web_contents| if
67 // the disposition is not NEW_WINDOW. Returns the WebContents corresponding 67 // the disposition is not NEW_WINDOW. Returns the WebContents corresponding
68 // to the restored tab. 68 // to the restored tab. If |disposition| is CURRENT_TAB, |source_web_contents|
69 // may be destroyed.
69 static content::WebContents* RestoreForeignSessionTab( 70 static content::WebContents* RestoreForeignSessionTab(
70 content::WebContents* source_web_contents, 71 content::WebContents* source_web_contents,
71 const SessionTab& tab, 72 const SessionTab& tab,
72 WindowOpenDisposition disposition); 73 WindowOpenDisposition disposition);
73 74
74 // Returns true if we're in the process of restoring |profile|. 75 // Returns true if we're in the process of restoring |profile|.
75 static bool IsRestoring(const Profile* profile); 76 static bool IsRestoring(const Profile* profile);
76 77
77 // Returns true if synchronously restoring a session. 78 // Returns true if synchronously restoring a session.
78 static bool IsRestoringSynchronously(); 79 static bool IsRestoringSynchronously();
79 80
80 // The max number of non-selected tabs SessionRestore loads when restoring 81 // The max number of non-selected tabs SessionRestore loads when restoring
81 // a session. A value of 0 indicates all tabs are loaded at once. 82 // a session. A value of 0 indicates all tabs are loaded at once.
82 static size_t num_tabs_to_load_; 83 static size_t num_tabs_to_load_;
83 84
84 private: 85 private:
85 SessionRestore(); 86 SessionRestore();
86 87
87 DISALLOW_COPY_AND_ASSIGN(SessionRestore); 88 DISALLOW_COPY_AND_ASSIGN(SessionRestore);
88 }; 89 };
89 90
90 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ 91 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/OWNERS ('k') | chrome/browser/sessions/session_restore_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698