diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-21 23:03:05 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-21 23:03:05 +0000 |
commit | 91e51d61689bb86daaaed223f5344b0d389eae65 (patch) | |
tree | 68e3dec431799c58d7ec3cf2c507a5757f23626f /chrome/browser/extensions/bundle_installer.cc | |
parent | 80737d4ce4cc5bd882e3328aac3d2bfa69487d2a (diff) | |
download | chromium_src-91e51d61689bb86daaaed223f5344b0d389eae65.zip chromium_src-91e51d61689bb86daaaed223f5344b0d389eae65.tar.gz chromium_src-91e51d61689bb86daaaed223f5344b0d389eae65.tar.bz2 |
Have ExtensionInstallPrompt take a WebContents
This CL implements a long standing TODO to change ExtensionInstallPrompt to take WebContents instead of a Browser.
This also fixes bug 156248 which I caused in r161479.
BUG=156248
Review URL: https://codereview.chromium.org/11184029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/bundle_installer.cc')
-rw-r--r-- | chrome/browser/extensions/bundle_installer.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/extensions/bundle_installer.cc b/chrome/browser/extensions/bundle_installer.cc index 11e4e1e..e2d0594 100644 --- a/chrome/browser/extensions/bundle_installer.cc +++ b/chrome/browser/extensions/bundle_installer.cc @@ -17,6 +17,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_manifest_constants.h" @@ -273,7 +274,10 @@ void BundleInstaller::ShowPrompt() { // thread hopping. browser = browser::FindLastActiveWithProfile(profile_); } - install_ui_.reset(chrome::CreateExtensionInstallPromptWithBrowser(browser)); + content::WebContents* web_contents = NULL; + if (browser) + web_contents = browser->tab_strip_model()->GetActiveWebContents(); + install_ui_.reset(new ExtensionInstallPrompt(web_contents)); install_ui_->ConfirmBundleInstall(this, permissions); } } |