OLD | NEW |
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 Loading... |
24 // command line this is invoked three times with the values 0, 1 and 2. | 24 // command line this is invoked three times with the values 0, 1 and 2. |
25 int GetIndexForInsertionDuringRestore(Browser* browser, int relative_index); | 25 int GetIndexForInsertionDuringRestore(Browser* browser, int relative_index); |
26 | 26 |
27 // Add a tab with its session history restored from the SessionRestore | 27 // Add a tab with its session history restored from the SessionRestore |
28 // system. If select is true, the tab is selected. |tab_index| gives the index | 28 // system. If select is true, the tab is selected. |tab_index| gives the index |
29 // to insert the tab at. |selected_navigation| is the index of the | 29 // to insert the tab at. |selected_navigation| is the index of the |
30 // TabNavigation in |navigations| to select. If |extension_app_id| is | 30 // TabNavigation in |navigations| to select. If |extension_app_id| is |
31 // non-empty the tab is an app tab and |extension_app_id| is the id of the | 31 // non-empty the tab is an app tab and |extension_app_id| is the id of the |
32 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then | 32 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then |
33 // the newly created tab is pinned. If |from_last_session| is true, | 33 // the newly created tab is pinned. If |from_last_session| is true, |
34 // |navigations| are from the previous session. | 34 // |navigations| are from the previous session. |user_agent_override| contains |
| 35 // the string being used as the user agent for all of the tab's navigations when |
| 36 // the regular user agent is overridden. |
35 content::WebContents* AddRestoredTab( | 37 content::WebContents* AddRestoredTab( |
36 Browser* browser, | 38 Browser* browser, |
37 const std::vector<TabNavigation>& navigations, | 39 const std::vector<TabNavigation>& navigations, |
38 int tab_index, | 40 int tab_index, |
39 int selected_navigation, | 41 int selected_navigation, |
40 const std::string& extension_app_id, | 42 const std::string& extension_app_id, |
41 bool select, | 43 bool select, |
42 bool pin, | 44 bool pin, |
43 bool from_last_session, | 45 bool from_last_session, |
44 content::SessionStorageNamespace* storage_namespace); | 46 content::SessionStorageNamespace* storage_namespace, |
| 47 const std::string& user_agent_override); |
45 | 48 |
46 // Replaces the state of the currently selected tab with the session | 49 // Replaces the state of the currently selected tab with the session |
47 // history restored from the SessionRestore system. | 50 // history restored from the SessionRestore system. |
48 void ReplaceRestoredTab( | 51 void ReplaceRestoredTab( |
49 Browser* browser, | 52 Browser* browser, |
50 const std::vector<TabNavigation>& navigations, | 53 const std::vector<TabNavigation>& navigations, |
51 int selected_navigation, | 54 int selected_navigation, |
52 bool from_last_session, | 55 bool from_last_session, |
53 const std::string& extension_app_id, | 56 const std::string& extension_app_id, |
54 content::SessionStorageNamespace* session_storage_namespace); | 57 content::SessionStorageNamespace* session_storage_namespace, |
| 58 const std::string& user_agent_override); |
55 | 59 |
56 | 60 |
57 } // namespace chrome | 61 } // namespace chrome |
58 | 62 |
59 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_ | 63 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_ |
OLD | NEW |