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

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

Issue 5139001: Revert 66350 - Add named testing interface. This allows you to connect to a p... (Closed) Base URL: svn://svn.chromium.org/chrome/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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 items->Append(item); 128 items->Append(item);
129 } 129 }
130 DictionaryValue* return_value = new DictionaryValue; 130 DictionaryValue* return_value = new DictionaryValue;
131 return_value->Set("tabs", items); 131 return_value->Set("tabs", items);
132 return return_value; 132 return return_value;
133 } 133 }
134 134
135 void InitialLoadObserver::ConditionMet() { 135 void InitialLoadObserver::ConditionMet() {
136 registrar_.RemoveAll(); 136 registrar_.RemoveAll();
137 automation_->OnInitialLoadsComplete(); 137 automation_->Send(new AutomationMsg_InitialLoadsComplete(0));
138 } 138 }
139 139
140 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) 140 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation)
141 : automation_(automation) { 141 : automation_(automation) {
142 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, 142 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD,
143 NotificationService::AllSources()); 143 NotificationService::AllSources());
144 } 144 }
145 145
146 NewTabUILoadObserver::~NewTabUILoadObserver() { 146 NewTabUILoadObserver::~NewTabUILoadObserver() {
147 } 147 }
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged)); 1437 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged));
1438 } 1438 }
1439 1439
1440 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() { 1440 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() {
1441 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) { 1441 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) {
1442 collection_->set_on_collection_changed_callback(NULL); 1442 collection_->set_on_collection_changed_callback(NULL);
1443 reply_.SendSuccess(NULL); 1443 reply_.SendSuccess(NULL);
1444 delete this; 1444 delete this;
1445 } 1445 }
1446 } 1446 }
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