| 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 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 items->Append(item); | 121 items->Append(item); |
| 122 } | 122 } |
| 123 DictionaryValue* return_value = new DictionaryValue; | 123 DictionaryValue* return_value = new DictionaryValue; |
| 124 return_value->Set("tabs", items); | 124 return_value->Set("tabs", items); |
| 125 return return_value; | 125 return return_value; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void InitialLoadObserver::ConditionMet() { | 128 void InitialLoadObserver::ConditionMet() { |
| 129 registrar_.RemoveAll(); | 129 registrar_.RemoveAll(); |
| 130 automation_->Send(new AutomationMsg_InitialLoadsComplete(0)); | 130 automation_->OnInitialLoadsComplete(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) | 133 NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation) |
| 134 : automation_(automation) { | 134 : automation_(automation) { |
| 135 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, | 135 registrar_.Add(this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, |
| 136 NotificationService::AllSources()); | 136 NotificationService::AllSources()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 NewTabUILoadObserver::~NewTabUILoadObserver() { | 139 NewTabUILoadObserver::~NewTabUILoadObserver() { |
| 140 } | 140 } |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged)); | 1363 this, &OnNotificationBalloonCountObserver::OnBalloonCollectionChanged)); |
| 1364 } | 1364 } |
| 1365 | 1365 |
| 1366 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() { | 1366 void OnNotificationBalloonCountObserver::OnBalloonCollectionChanged() { |
| 1367 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) { | 1367 if (static_cast<int>(collection_->GetActiveBalloons().size()) == count_) { |
| 1368 collection_->set_on_collection_changed_callback(NULL); | 1368 collection_->set_on_collection_changed_callback(NULL); |
| 1369 reply_.SendSuccess(NULL); | 1369 reply_.SendSuccess(NULL); |
| 1370 delete this; | 1370 delete this; |
| 1371 } | 1371 } |
| 1372 } | 1372 } |
| OLD | NEW |