summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_observer.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 15:24:08 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 15:24:08 +0000
commit2f93641aca552e88c4810924fe2135b626707b45 (patch)
tree26b29b0da55fb33174def9948f0bbdb859161edd /chrome/browser/plugin_observer.cc
parent678e68ab1a5fa99f07634cce9ac22a6d700436df (diff)
downloadchromium_src-2f93641aca552e88c4810924fe2135b626707b45.zip
chromium_src-2f93641aca552e88c4810924fe2135b626707b45.tar.gz
chromium_src-2f93641aca552e88c4810924fe2135b626707b45.tar.bz2
Move infobar handling to a tab helper, part 1.
BUG=94741 TEST=no visible change Review URL: http://codereview.chromium.org/7810002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_observer.cc')
-rw-r--r--chrome/browser/plugin_observer.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index c7a323d..44d414e 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -7,6 +7,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
@@ -320,15 +321,17 @@ void PluginObserver::OnCrashedPlugin(const FilePath& plugin_path) {
}
gfx::Image* icon = &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_INFOBAR_PLUGIN_CRASHED);
- tab_contents_->AddInfoBar(new SimpleAlertInfoBarDelegate(tab_contents(),
- icon,
- l10n_util::GetStringFUTF16(IDS_PLUGIN_CRASHED_PROMPT, plugin_name),
- true));
+ tab_contents_->infobar_tab_helper()->AddInfoBar(
+ new SimpleAlertInfoBarDelegate(
+ tab_contents(),
+ icon,
+ l10n_util::GetStringFUTF16(IDS_PLUGIN_CRASHED_PROMPT, plugin_name),
+ true));
}
void PluginObserver::OnBlockedOutdatedPlugin(const string16& name,
const GURL& update_url) {
- tab_contents_->AddInfoBar(update_url.is_empty() ?
+ tab_contents_->infobar_tab_helper()->AddInfoBar(update_url.is_empty() ?
static_cast<InfoBarDelegate*>(new BlockedPluginInfoBarDelegate(
tab_contents(), name)) :
new OutdatedPluginInfoBarDelegate(tab_contents(), name, update_url));