summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 16:46:40 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 16:46:40 +0000
commit911f815112d8d11778c771467fbef2c2b1f8e160 (patch)
treea6f9aa0ad2d669de7860e6f4da1b9e7f31f1354d /chrome/browser/browser.h
parent4a827847f1b9b860bcd5c45725249a3de3cfc205 (diff)
downloadchromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.zip
chromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.tar.gz
chromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.tar.bz2
Makes pinned tab restore on startup if you haven't enabled session
restore. BUG=23613 TEST=turn off session restore, pin a tab, restart chrome and make sure you get back the pinned tab. Review URL: http://codereview.chromium.org/1026005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r--chrome/browser/browser.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 37e62505..51470f7 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -91,6 +91,18 @@ class Browser : public TabStripModelDelegate,
MAXIMIZED_STATE_UNMAXIMIZED
};
+ // Constants passed to AddTabWithURL.
+ enum AddTabTypes {
+ // The tab should be selected.
+ ADD_SELECTED = 1 << 0,
+
+ // The tab should be pinned.
+ ADD_PINNED = 1 << 1,
+
+ // See TabStripModel::AddTabContents for details.
+ ADD_FORCE_INDEX = 1 << 2,
+ };
+
// Constructors, Creation, Showing //////////////////////////////////////////
// Creates a new browser of the given |type| and for the given |profile|. The
@@ -283,6 +295,7 @@ class Browser : public TabStripModelDelegate,
// will be used to render the tab. |force_index| is passed through to
// TabStripModel::AddTabContents and its meaning is documented with its
// declaration.
+ // TODO(sky): nuke this and convert callers to new AddTablWithURL variant.
TabContents* AddTabWithURL(const GURL& url,
const GURL& referrer,
PageTransition::Type transition,
@@ -291,6 +304,18 @@ class Browser : public TabStripModelDelegate,
bool force_index,
SiteInstance* instance);
+ // Adds a new tab at the specified index. |add_types| is a bitmask of the
+ // values defined by AddTabTypes; see AddTabTypes for details. If |instance|
+ // is not null, its process will be used to render the tab. If
+ // |app_extension_id| is non-empty the new tab is an app tab.
+ TabContents* AddTabWithURL(const GURL& url,
+ const GURL& referrer,
+ PageTransition::Type transition,
+ int index,
+ int add_types,
+ SiteInstance* instance,
+ const std::string& app_extension_id);
+
// Add a new tab, given a TabContents. A TabContents appropriate to
// display the last committed entry is created and returned.
TabContents* AddTab(TabContents* tab_contents, PageTransition::Type type);
@@ -793,11 +818,6 @@ class Browser : public TabStripModelDelegate,
// done only once per application name / per session.
static void RegisterAppPrefs(const std::wstring& app_name);
- // If |app_extension_id| is not empty this sets the application extension of
- // |contents| to the extension whose id is |app_extension_id|.
- void SetAppExtensionById(TabContents* contents,
- const std::string& app_extension_id);
-
// Shared code between Reload() and ReloadAll().
void ReloadInternal(bool ignore_cache);