diff options
Diffstat (limited to 'chrome/browser/extensions')
| -rw-r--r-- | chrome/browser/extensions/extension_dom_ui.cc | 9 | ||||
| -rw-r--r-- | chrome/browser/extensions/extension_install_ui.cc | 3 | ||||
| -rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 11 |
3 files changed, 12 insertions, 11 deletions
diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc index b23d12c..29768b9 100644 --- a/chrome/browser/extensions/extension_dom_ui.cc +++ b/chrome/browser/extensions/extension_dom_ui.cc @@ -177,12 +177,9 @@ void ExtensionDOMUI::ProcessDOMUIMessage(const std::string& message, } Browser* ExtensionDOMUI::GetBrowser() const { - Browser* browser = NULL; - TabContentsDelegate* tab_contents_delegate = tab_contents()->delegate(); - if (tab_contents_delegate) - browser = tab_contents_delegate->GetBrowser(); - - return browser; + // TODO(beng): This is an improper direct dependency on Browser. Route this + // through some sort of delegate. + return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); } Profile* ExtensionDOMUI::GetProfile() { diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index 3468336..bd59dd4 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -200,7 +200,8 @@ void ExtensionInstallUI::OnInstallSuccess(Extension* extension) { url += "/#"; url += hash_params; browser->AddTabWithURL(GURL(url), GURL(), PageTransition::TYPED, -1, - TabStripModel::ADD_SELECTED, NULL, std::string()); + TabStripModel::ADD_SELECTED, NULL, std::string(), + NULL); } return; diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index cf15d02..79b3cdf 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -373,7 +373,8 @@ bool CreateWindowFunction::RunImpl() { Browser* new_window = new Browser(window_type, window_profile); new_window->CreateBrowserWindow(); new_window->AddTabWithURL(url, GURL(), PageTransition::LINK, -1, - TabStripModel::ADD_SELECTED, NULL, std::string()); + TabStripModel::ADD_SELECTED, NULL, std::string(), + &new_window); new_window->window()->SetBounds(bounds); new_window->window()->Show(); @@ -581,15 +582,17 @@ bool CreateTabFunction::RunImpl() { TabStripModel::ADD_NONE; add_types |= TabStripModel::ADD_FORCE_INDEX; TabContents* contents = browser->AddTabWithURL(url, GURL(), - PageTransition::LINK, index, add_types, NULL, std::string()); - index = tab_strip->GetIndexOfTabContents(contents); + PageTransition::LINK, index, add_types, NULL, std::string(), &browser); + index = browser->tabstrip_model()->GetIndexOfTabContents(contents); if (selected) contents->Focus(); // Return data about the newly created tab. if (has_callback()) - result_.reset(ExtensionTabUtil::CreateTabValue(contents, tab_strip, index)); + result_.reset(ExtensionTabUtil::CreateTabValue(contents, + browser->tabstrip_model(), + index)); return true; } |
