Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: chrome/browser/tab_contents/infobar_container.cc

Issue 7810002: Move infobar handling to a tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/infobar.cc ('k') | chrome/browser/tab_contents/infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/infobar_container.cc
diff --git a/chrome/browser/tab_contents/infobar_container.cc b/chrome/browser/tab_contents/infobar_container.cc
index cfd66e6e1300ec1d2a3a900ab5efc70c7d1aa12b..e01d38af47625e813cd9c3f726677675ad974692 100644
--- a/chrome/browser/tab_contents/infobar_container.cc
+++ b/chrome/browser/tab_contents/infobar_container.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/tab_contents/infobar_container.h"
+#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/tab_contents/infobar.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
@@ -51,11 +52,14 @@ void InfoBarContainer::ChangeTabContents(TabContentsWrapper* contents) {
registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED,
tc_source);
- for (size_t i = 0; i < tab_contents_->infobar_count(); ++i) {
+ for (size_t i = 0;
+ i < tab_contents_->infobar_tab_helper()->infobar_count();
+ ++i) {
// As when we removed the infobars above, we prevent callbacks to
// OnInfoBarAnimated() for each infobar.
AddInfoBar(
- tab_contents_->GetInfoBarDelegateAt(i)->CreateInfoBar(tab_contents_),
+ tab_contents_->infobar_tab_helper()->GetInfoBarDelegateAt(i)->
+ CreateInfoBar(tab_contents_),
i, false, NO_CALLBACK);
}
}
« no previous file with comments | « chrome/browser/tab_contents/infobar.cc ('k') | chrome/browser/tab_contents/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698