Chromium Code Reviews

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

Issue 5707006: Revert "Add named testing interface." (Closed)
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/ui/browser_init.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 124 matching lines...)
135 } 135 }
136 items->Append(item); 136 items->Append(item);
137 } 137 }
138 DictionaryValue* return_value = new DictionaryValue; 138 DictionaryValue* return_value = new DictionaryValue;
139 return_value->Set("tabs", items); 139 return_value->Set("tabs", items);
140 return return_value; 140 return return_value;
141 } 141 }
142 142
143 void InitialLoadObserver::ConditionMet() { 143 void InitialLoadObserver::ConditionMet() {
144 registrar_.RemoveAll(); 144 registrar_.RemoveAll();
145 automation_->OnInitialLoadsComplete(); 145 automation_->Send(new AutomationMsg_InitialLoadsComplete(0));
146 } 146 }
147 147
148 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) 148 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation)
149 : automation_(automation) { 149 : automation_(automation) {
150 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, 150 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD,
151 NotificationService::AllSources()); 151 NotificationService::AllSources());
152 } 152 }
153 153
154 NewTabUILoadObserver::~NewTabUILoadObserver() { 154 NewTabUILoadObserver::~NewTabUILoadObserver() {
155 } 155 }
(...skipping 1377 matching lines...)
1533 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged)); 1533 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged));
1534 } 1534 }
1535 1535
1536 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() { 1536 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() {
1537 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) { 1537 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) {
1538 collection_->set_on_collection_changed_callback(NULL); 1538 collection_->set_on_collection_changed_callback(NULL);
1539 reply_.SendSuccess(NULL); 1539 reply_.SendSuccess(NULL);
1540 delete this; 1540 delete this;
1541 } 1541 }
1542 } 1542 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/ui/browser_init.h » ('j') | no next file with comments »

Powered by Google App Engine