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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "chrome/browser/sessions/session_types.h"
12
13 class Browser;
14
15 namespace content {
16 class SessionStorageNamespace;
17 class WebContents;
18 }
19
20 namespace chrome {
21
22 // Returns the index to insert a tab at during session restore and startup.
23 // |relative_index| gives the index of the url into the number of tabs that
24 // are going to be opened. For example, if three urls are passed in on the
25 // command line this is invoked three times with the values 0, 1 and 2.
26 int GetIndexForInsertionDuringRestore(Browser* browser, int relative_index);
27
28 // Add a tab with its session history restored from the SessionRestore
29 // system. If select is true, the tab is selected. |tab_index| gives the index
30 // to insert the tab at. |selected_navigation| is the index of the
31 // TabNavigation in |navigations| to select. If |extension_app_id| is
32 // non-empty the tab is an app tab and |extension_app_id| is the id of the
33 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then
34 // the newly created tab is pinned. If |from_last_session| is true,
35 // |navigations| are from the previous session.
36 content::WebContents* AddRestoredTab(
37 Browser* browser,
38 const std::vector<TabNavigation>& 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
47 // Replaces the state of the currently selected tab with the session
48 // history restored from the SessionRestore system.
49 void ReplaceRestoredTab(
50 Browser* browser,
51 const std::vector<TabNavigation>& navigations,
52 int selected_navigation,
53 bool from_last_session,
54 const std::string& extension_app_id,
55 content::SessionStorageNamespace* session_storage_namespace);
56
57
58 } // namespace chrome
59
60 #endif // CHROME_BROWSER_UI_BROWSER_TABRESTORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_restore_service_delegate.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698