OLD | NEW |
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 items->Append(item); | 140 items->Append(item); |
141 } | 141 } |
142 DictionaryValue* return_value = new DictionaryValue; | 142 DictionaryValue* return_value = new DictionaryValue; |
143 return_value->Set("tabs", items); | 143 return_value->Set("tabs", items); |
144 return return_value; | 144 return return_value; |
145 } | 145 } |
146 | 146 |
147 void InitialLoadObserver::ConditionMet() { | 147 void InitialLoadObserver::ConditionMet() { |
148 registrar_.RemoveAll(); | 148 registrar_.RemoveAll(); |
149 automation_->Send(new AutomationMsg_InitialLoadsComplete(0)); | 149 automation_->OnInitialLoadsComplete(); |
150 } | 150 } |
151 | 151 |
152 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) | 152 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) |
153 : automation_(automation) { | 153 : automation_(automation) { |
154 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, | 154 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, |
155 NotificationService::AllSources()); | 155 NotificationService::AllSources()); |
156 } | 156 } |
157 | 157 |
158 NewTabUILoadObserver::~NewTabUILoadObserver() { | 158 NewTabUILoadObserver::~NewTabUILoadObserver() { |
159 } | 159 } |
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 NotificationService::AllSources()); | 1632 NotificationService::AllSources()); |
1633 } | 1633 } |
1634 | 1634 |
1635 void RendererProcessClosedObserver::Observe( | 1635 void RendererProcessClosedObserver::Observe( |
1636 NotificationType type, | 1636 NotificationType type, |
1637 const NotificationSource& source, | 1637 const NotificationSource& source, |
1638 const NotificationDetails& details) { | 1638 const NotificationDetails& details) { |
1639 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); | 1639 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); |
1640 delete this; | 1640 delete this; |
1641 } | 1641 } |
OLD | NEW |