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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 14241006: Eliminate InfoBarTabHelper. Make InfoBarService a concrete class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 const content::NotificationSource& source, 1232 const content::NotificationSource& source,
1233 const content::NotificationDetails& details) { 1233 const content::NotificationDetails& details) {
1234 DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED || 1234 DCHECK(type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED ||
1235 type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED); 1235 type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED);
1236 CheckCount(); 1236 CheckCount();
1237 } 1237 }
1238 1238
1239 void InfoBarCountObserver::CheckCount() { 1239 void InfoBarCountObserver::CheckCount() {
1240 InfoBarService* infobar_service = 1240 InfoBarService* infobar_service =
1241 InfoBarService::FromWebContents(web_contents_); 1241 InfoBarService::FromWebContents(web_contents_);
1242 if (infobar_service->GetInfoBarCount() != target_count_) 1242 if (infobar_service->infobar_count() != target_count_)
1243 return; 1243 return;
1244 1244
1245 if (automation_) { 1245 if (automation_) {
1246 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_.get(), 1246 AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message_.get(),
1247 true); 1247 true);
1248 automation_->Send(reply_message_.release()); 1248 automation_->Send(reply_message_.release());
1249 } 1249 }
1250 delete this; 1250 delete this;
1251 } 1251 }
1252 1252
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 if (automation_) { 2849 if (automation_) {
2850 AutomationJSONReply(automation_, reply_message_.release()) 2850 AutomationJSONReply(automation_, reply_message_.release())
2851 .SendSuccess(NULL); 2851 .SendSuccess(NULL);
2852 } 2852 }
2853 delete this; 2853 delete this;
2854 } 2854 }
2855 } else { 2855 } else {
2856 NOTREACHED(); 2856 NOTREACHED();
2857 } 2857 }
2858 } 2858 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_delegate.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698