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

Unified Diff: chrome/browser/automation/automation_provider_observers.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/automation/automation_provider_observers.cc
===================================================================
--- chrome/browser/automation/automation_provider_observers.cc (revision 87541)
+++ chrome/browser/automation/automation_provider_observers.cc (working copy)
@@ -1363,13 +1363,13 @@
InfoBarCountObserver::InfoBarCountObserver(AutomationProvider* automation,
IPC::Message* reply_message,
- TabContents* tab_contents,
+ TabContentsWrapper* tab_contents,
size_t target_count)
: automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
tab_contents_(tab_contents),
target_count_(target_count) {
- Source<TabContents> source(tab_contents);
+ Source<TabContentsWrapper> source(tab_contents);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_ADDED, source);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED, source);
CheckCount();
@@ -1386,9 +1386,7 @@
}
void InfoBarCountObserver::CheckCount() {
- TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents_);
- if (wrapper->infobar_count() != target_count_)
+ if (tab_contents_->infobar_count() != target_count_)
return;
if (automation_) {
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698