diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-01 15:24:08 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-01 15:24:08 +0000 |
commit | 2f93641aca552e88c4810924fe2135b626707b45 (patch) | |
tree | 26b29b0da55fb33174def9948f0bbdb859161edd /chrome/browser/extensions/extension_install_ui.cc | |
parent | 678e68ab1a5fa99f07634cce9ac22a6d700436df (diff) | |
download | chromium_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/extensions/extension_install_ui.cc')
-rw-r--r-- | chrome/browser/extensions/extension_install_ui.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index 44c7b5e..7d6ac03 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -14,6 +14,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/extension_install_dialog.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" +#include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/simple_message_box.h" #include "chrome/browser/tabs/tab_strip_model.h" @@ -259,11 +260,12 @@ void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id, TabContentsWrapper* tab_contents = browser->GetSelectedTabContentsWrapper(); if (!tab_contents) return; + InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); // First find any previous theme preview infobars. InfoBarDelegate* old_delegate = NULL; - for (size_t i = 0; i < tab_contents->infobar_count(); ++i) { - InfoBarDelegate* delegate = tab_contents->GetInfoBarDelegateAt(i); + for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { + InfoBarDelegate* delegate = infobar_helper->GetInfoBarDelegateAt(i); ThemeInstalledInfoBarDelegate* theme_infobar = delegate->AsThemePreviewInfobarDelegate(); if (theme_infobar) { @@ -283,9 +285,9 @@ void ExtensionInstallUI::ShowThemeInfoBar(const std::string& previous_theme_id, previous_using_native_theme); if (old_delegate) - tab_contents->ReplaceInfoBar(old_delegate, new_delegate); + infobar_helper->ReplaceInfoBar(old_delegate, new_delegate); else - tab_contents->AddInfoBar(new_delegate); + infobar_helper->AddInfoBar(new_delegate); } void ExtensionInstallUI::ShowConfirmation(PromptType prompt_type) { |