diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 17:00:33 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 17:00:33 +0000 |
commit | 3240d2502106b171635231826c72b0f440fba9c9 (patch) | |
tree | cd4efdddffd712446f042c3b86e77cc4d645ba12 /chrome/browser/plugin_installer_observer.cc | |
parent | 1efa8696f8388ca66491c68508f0c75d69d6f1d0 (diff) | |
download | chromium_src-3240d2502106b171635231826c72b0f440fba9c9.zip chromium_src-3240d2502106b171635231826c72b0f440fba9c9.tar.gz chromium_src-3240d2502106b171635231826c72b0f440fba9c9.tar.bz2 |
Keep infobar visible during plug-in installation and show installation state.
Instead of dismissing the infobar when the user accepts it, it's now dismissed when the last missing plug-in placeholder is gone (because we loaded the actual plug-in).
BUG=110701
TEST=none
Review URL: http://codereview.chromium.org/9269007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_installer_observer.cc')
-rw-r--r-- | chrome/browser/plugin_installer_observer.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/browser/plugin_installer_observer.cc b/chrome/browser/plugin_installer_observer.cc index 72284c7..419f60e 100644 --- a/chrome/browser/plugin_installer_observer.cc +++ b/chrome/browser/plugin_installer_observer.cc @@ -8,13 +8,11 @@ PluginInstallerObserver::PluginInstallerObserver(PluginInstaller* installer) : installer_(installer) { - if (installer) - installer->AddObserver(this); + installer->AddObserver(this); } PluginInstallerObserver::~PluginInstallerObserver() { - if (installer_) - installer_->RemoveObserver(this); + installer_->RemoveObserver(this); } void PluginInstallerObserver::DidStartDownload() { @@ -25,3 +23,15 @@ void PluginInstallerObserver::DidFinishDownload() { void PluginInstallerObserver::DownloadError(const std::string& message) { } + +WeakPluginInstallerObserver::WeakPluginInstallerObserver( + PluginInstaller* installer) : PluginInstallerObserver(installer) { + installer->AddWeakObserver(this); +} + +WeakPluginInstallerObserver::~WeakPluginInstallerObserver() { + installer()->RemoveWeakObserver(this); +} + +void WeakPluginInstallerObserver::OnlyWeakObserversLeft() { +} |