summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/filebrowse_ui.cc
diff options
context:
space:
mode:
authortwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 21:24:59 +0000
committertwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 21:24:59 +0000
commitb283a75393c7c54e33ca7d25f9eec55ac6a2960b (patch)
treef18455820a1e47b5da8602f7ebc0a99296866e11 /chrome/browser/dom_ui/filebrowse_ui.cc
parent8e07d29abff1de820b4ca5105534f3bcc6a0510d (diff)
downloadchromium_src-b283a75393c7c54e33ca7d25f9eec55ac6a2960b.zip
chromium_src-b283a75393c7c54e33ca7d25f9eec55ac6a2960b.tar.gz
chromium_src-b283a75393c7c54e33ca7d25f9eec55ac6a2960b.tar.bz2
Clone of issue 2941001. See initial review below.
http://codereview.chromium.org/2941001 Initial submit broke the chromeos build. This patch includes the original change, and fixes to compile ChromeOs properly. BUG=None TEST=None Review URL: http://codereview.chromium.org/2819086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/filebrowse_ui.cc')
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index 84c813f..14e9748 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -751,13 +751,9 @@ void FilebrowseHandler::OpenNewWindow(const Value* value, bool popup) {
} else {
browser = BrowserList::GetLastActive();
}
- TabContents* contents = browser->AddTabWithURL(
- 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.
- browser = contents->delegate()->GetBrowser();
+ browser->AddTabWithURL(GURL(path), GURL(), PageTransition::LINK, -1,
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser);
if (popup) {
// TODO(dhg): Remove these from being hardcoded. Allow javascript
// to specify.
@@ -1120,7 +1116,8 @@ Browser* FileBrowseUI::OpenPopup(Profile* profile,
browser->AddTabWithURL(
GURL(url), GURL(), PageTransition::LINK, -1,
- TabStripModel::ADD_SELECTED, NULL, std::string());
+ TabStripModel::ADD_SELECTED, NULL, std::string(),
+ &browser);
browser->window()->SetBounds(gfx::Rect(kPopupLeft,
kPopupTop,
width,