Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / browser_tabrestore.h
bloba4e70943662a7a20c1c1184fcb50ce1ccc21aea1
1 // Copyright 2012 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.
5 #ifndef CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
8 #include <vector>
10 #include "components/sessions/session_types.h"
12 class Browser;
14 namespace content {
15 class SessionStorageNamespace;
16 class WebContents;
19 namespace sessions {
20 class SerializedNavigationEntry;
23 namespace chrome {
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
27 // to insert the tab at. |selected_navigation| is the index of the
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
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,
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
34 // the regular user agent is overridden. Returns the WebContents of the restored
35 // tab.
36 content::WebContents* AddRestoredTab(
37 Browser* browser,
38 const std::vector<sessions::SerializedNavigationEntry>& navigations,
39 int tab_index,
40 int selected_navigation,
41 const std::string& extension_app_id,
42 bool select,
43 bool pin,
44 bool from_last_session,
45 content::SessionStorageNamespace* storage_namespace,
46 const std::string& user_agent_override);
48 // Replaces the state of the currently selected tab with the session
49 // history restored from the SessionRestore system. Returns the WebContents of
50 // the restored tab.
51 content::WebContents* ReplaceRestoredTab(
52 Browser* browser,
53 const std::vector<sessions::SerializedNavigationEntry>& navigations,
54 int selected_navigation,
55 bool from_last_session,
56 const std::string& extension_app_id,
57 content::SessionStorageNamespace* session_storage_namespace,
58 const std::string& user_agent_override);
61 } // namespace chrome
63 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_