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/dom_ui | |
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/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/filebrowse_ui.cc | 8 | ||||
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc | 3 | ||||
-rw-r--r-- | chrome/browser/dom_ui/mediaplayer_ui.cc | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc index 0436056..69d39bc 100644 --- a/chrome/browser/dom_ui/filebrowse_ui.cc +++ b/chrome/browser/dom_ui/filebrowse_ui.cc @@ -732,8 +732,8 @@ void FilebrowseHandler::OpenNewWindow(const Value* value, bool popup) { browser = BrowserList::GetLastActive(); } TabContents* contents = browser->AddTabWithURL( - GURL(path), GURL(), PageTransition::LINK, -1, Browser::ADD_SELECTED, - NULL, std::string()); + GURL(path), GURL(), PageTransition::LINK, -1, + TabStripModel::ADD_SELECTED, NULL, std::string()); // AddTabWithURL could have picked another Browser instance to create this // new tab at. So we have to reset the ptr of the browser that we want to // talk to. @@ -1100,8 +1100,8 @@ Browser* FileBrowseUI::OpenPopup(Profile* profile, } browser->AddTabWithURL( - GURL(url), GURL(), PageTransition::LINK, -1, Browser::ADD_SELECTED, - NULL, std::string()); + GURL(url), GURL(), PageTransition::LINK, -1, + TabStripModel::ADD_SELECTED, NULL, std::string()); browser->window()->SetBounds(gfx::Rect(kPopupLeft, kPopupTop, width, diff --git a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc index 6864386..a2ba5eb 100644 --- a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc +++ b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc @@ -42,7 +42,8 @@ void HtmlDialogTabContentsDelegate::OpenURLFromTab( Browser* browser = CreateBrowser(); TabContents* new_contents = browser->AddTabWithURL(url, referrer, transition, -1, - Browser::ADD_SELECTED, NULL, std::string()); + TabStripModel::ADD_SELECTED, NULL, + std::string()); DCHECK(new_contents); browser->window()->Show(); new_contents->Focus(); diff --git a/chrome/browser/dom_ui/mediaplayer_ui.cc b/chrome/browser/dom_ui/mediaplayer_ui.cc index b468ad2..9e08f6d 100644 --- a/chrome/browser/dom_ui/mediaplayer_ui.cc +++ b/chrome/browser/dom_ui/mediaplayer_ui.cc @@ -503,7 +503,7 @@ void MediaPlayer::PopupPlaylist(Browser* creator) { playlist_browser_ = Browser::CreateForPopup(profile); playlist_browser_->AddTabWithURL( GURL(kMediaplayerPlaylistURL), GURL(), PageTransition::LINK, - -1, Browser::ADD_SELECTED, NULL, std::string()); + -1, TabStripModel::ADD_SELECTED, NULL, std::string()); playlist_browser_->window()->SetBounds(gfx::Rect(kPopupLeft, kPopupTop, kPopupWidth, @@ -535,7 +535,7 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) { #endif mediaplayer_browser_->AddTabWithURL( GURL(kMediaplayerURL), GURL(), PageTransition::LINK, - -1, Browser::ADD_SELECTED, NULL, std::string()); + -1, TabStripModel::ADD_SELECTED, NULL, std::string()); mediaplayer_browser_->window()->SetBounds(gfx::Rect(kPopupLeft, kPopupTop, kPopupWidth, |