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

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

Issue 4202004: Add named testing interface (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« 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 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 items->Append(item); 134 items->Append(item);
135 } 135 }
136 DictionaryValue* return_value = new DictionaryValue; 136 DictionaryValue* return_value = new DictionaryValue;
137 return_value->Set("tabs", items); 137 return_value->Set("tabs", items);
138 return return_value; 138 return return_value;
139 } 139 }
140 140
141 void InitialLoadObserver::ConditionMet() { 141 void InitialLoadObserver::ConditionMet() {
142 registrar_.RemoveAll(); 142 registrar_.RemoveAll();
143 automation_->Send(new AutomationMsg_InitialLoadsComplete(0)); 143 automation_->OnInitialLoadsComplete();
144 } 144 }
145 145
146 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) 146 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation)
147 : automation_(automation) { 147 : automation_(automation) {
148 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, 148 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD,
149 NotificationService::AllSources()); 149 NotificationService::AllSources());
150 } 150 }
151 151
152 NewTabUILoadObserver::~NewTabUILoadObserver() { 152 NewTabUILoadObserver::~NewTabUILoadObserver() {
153 } 153 }
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged)); 1528 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged));
1529 } 1529 }
1530 1530
1531 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() { 1531 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() {
1532 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) { 1532 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) {
1533 collection_->set_on_collection_changed_callback(NULL); 1533 collection_->set_on_collection_changed_callback(NULL);
1534 reply_.SendSuccess(NULL); 1534 reply_.SendSuccess(NULL);
1535 delete this; 1535 delete this;
1536 } 1536 }
1537 } 1537 }
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
This is Rietveld 408576698