diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 19:32:28 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 19:32:28 +0000 |
commit | 90e76c6d9e254b1faec975adf097ff2d888840c0 (patch) | |
tree | 2ff4a6db80e41619c4452db3713f83f3c22ac885 /chrome/browser/browser.h | |
parent | d3002235bebf6df780b2425b1fb7606e0c033974 (diff) | |
download | chromium_src-90e76c6d9e254b1faec975adf097ff2d888840c0.zip chromium_src-90e76c6d9e254b1faec975adf097ff2d888840c0.tar.gz chromium_src-90e76c6d9e254b1faec975adf097ff2d888840c0.tar.bz2 |
Moves Browser::AddTypes to TabStripModel. This patch is primarily
cleanup before I fix 29933, but has a couple of interesting bits
beyond the enum change:
. AddTabContents now supports adding pinned.
. Nuked duplicate code in Browser::addTabWithURL that invoked
wasHidden on the TabContents. This code is already in TabStripModel.
. Moved code for setting visibility of tabcontents from
TabStripModel::AddTabContents to InsertTabContentsAt. Since everything
ends up in InsertTabContentsAt it should be there.
. Converted InsertTabContents call in extensionstabmodule to pass in
nothing (Rafael said old code was wrong).
BUG=29933
TEST=none
Review URL: http://codereview.chromium.org/2863021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r-- | chrome/browser/browser.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 6b7671a..e3add6e 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -104,22 +104,6 @@ class Browser : public TabStripModelDelegate, MAXIMIZED_STATE_UNMAXIMIZED }; - // Constants passed to AddTabWithURL. - enum AddTabTypes { - // Used to indicate nothing special should happen to the newly inserted - // tab. - ADD_NONE = 0, - - // 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 @@ -339,8 +323,8 @@ class Browser : public TabStripModelDelegate, int GetIndexForInsertionDuringRestore(int relative_index); // 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 + // values defined by TabStripModel::AddTabTypes; see it for details. If + // |instance| is not null, its process will be used to render the tab. If // |extension_app_id| is non-empty the new tab is an app tab. TabContents* AddTabWithURL(const GURL& url, const GURL& referrer, |