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

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

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
Index: chrome/browser/tab_contents/tab_contents_ssl_helper.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents_ssl_helper.cc (revision 87541)
+++ chrome/browser/tab_contents/tab_contents_ssl_helper.cc (working copy)
@@ -128,7 +128,7 @@
TabContentsWrapper* tab_contents)
: tab_contents_(tab_contents),
infobar_delegate_(NULL) {
- Source<TabContents> source(tab_contents_->tab_contents());
+ Source<TabContentsWrapper> source(tab_contents_);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED, source);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REPLACED, source);
}
@@ -155,11 +155,12 @@
NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> InfoBarDelegatePair;
+ DCHECK(type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED ||
+ type.value == NotificationType::TAB_CONTENTS_INFOBAR_REPLACED);
if (infobar_delegate_ ==
((type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) ?
- Details<InfoBarDelegate>(details).ptr() :
- Details<InfoBarDelegatePair>(details).ptr()->first))
+ Details<std::pair<InfoBarDelegate*, bool> >(details)->first :
+ Details<std::pair<InfoBarDelegate*, InfoBar*> >(details)->first))
infobar_delegate_ = NULL;
}
« no previous file with comments | « chrome/browser/tab_contents/infobar_container.cc ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698