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

Side by Side Diff: chrome/browser/ui/browser_tabrestore.h

Issue 21022018: Sessions API - previously Session Restore API. Supports restoring currently open foreign windows an… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added assert true to test Created 7 years, 4 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
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_UI_BROWSER_TABRESTORE_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_ 6 #define CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/sessions/session_types.h" 10 #include "chrome/browser/sessions/session_types.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Add a tab with its session history restored from the SessionRestore 25 // Add a tab with its session history restored from the SessionRestore
26 // system. If select is true, the tab is selected. |tab_index| gives the index 26 // system. If select is true, the tab is selected. |tab_index| gives the index
27 // to insert the tab at. |selected_navigation| is the index of the 27 // to insert the tab at. |selected_navigation| is the index of the
28 // SerializedNavigationEntry in |navigations| to select. If |extension_app_id| 28 // SerializedNavigationEntry in |navigations| to select. If |extension_app_id|
29 // is non-empty the tab is an app tab and |extension_app_id| is the id of the 29 // is non-empty the tab is an app tab and |extension_app_id| is the id of the
30 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then 30 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then
31 // the newly created tab is pinned. If |from_last_session| is true, 31 // the newly created tab is pinned. If |from_last_session| is true,
32 // |navigations| are from the previous session. |user_agent_override| contains 32 // |navigations| are from the previous session. |user_agent_override| contains
33 // the string being used as the user agent for all of the tab's navigations when 33 // the string being used as the user agent for all of the tab's navigations when
34 // the regular user agent is overridden. 34 // the regular user agent is overridden. Returns the WebContents of the restored
35 // tab.
35 content::WebContents* AddRestoredTab( 36 content::WebContents* AddRestoredTab(
36 Browser* browser, 37 Browser* browser,
37 const std::vector<sessions::SerializedNavigationEntry>& navigations, 38 const std::vector<sessions::SerializedNavigationEntry>& navigations,
38 int tab_index, 39 int tab_index,
39 int selected_navigation, 40 int selected_navigation,
40 const std::string& extension_app_id, 41 const std::string& extension_app_id,
41 bool select, 42 bool select,
42 bool pin, 43 bool pin,
43 bool from_last_session, 44 bool from_last_session,
44 content::SessionStorageNamespace* storage_namespace, 45 content::SessionStorageNamespace* storage_namespace,
45 const std::string& user_agent_override); 46 const std::string& user_agent_override);
46 47
47 // Replaces the state of the currently selected tab with the session 48 // Replaces the state of the currently selected tab with the session
48 // history restored from the SessionRestore system. 49 // history restored from the SessionRestore system. Returns the WebContents of
49 void ReplaceRestoredTab( 50 // the restored tab.
51 content::WebContents* ReplaceRestoredTab(
50 Browser* browser, 52 Browser* browser,
51 const std::vector<sessions::SerializedNavigationEntry>& navigations, 53 const std::vector<sessions::SerializedNavigationEntry>& navigations,
52 int selected_navigation, 54 int selected_navigation,
53 bool from_last_session, 55 bool from_last_session,
54 const std::string& extension_app_id, 56 const std::string& extension_app_id,
55 content::SessionStorageNamespace* session_storage_namespace, 57 content::SessionStorageNamespace* session_storage_namespace,
56 const std::string& user_agent_override); 58 const std::string& user_agent_override);
57 59
58 60
59 } // namespace chrome 61 } // namespace chrome
60 62
61 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_ 63 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698