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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
| 1543 |
| 1544 RendererProcessClosedObserver::RendererProcessClosedObserver( |
| 1545 AutomationProvider* automation, |
| 1546 IPC::Message* reply_message) |
| 1547 : automation_(automation), |
| 1548 reply_message_(reply_message) { |
| 1549 registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED, |
| 1550 NotificationService::AllSources()); |
| 1551 } |
| 1552 |
| 1553 void RendererProcessClosedObserver::Observe( |
| 1554 NotificationType type, |
| 1555 const NotificationSource& source, |
| 1556 const NotificationDetails& details) { |
| 1557 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); |
| 1558 delete this; |
| 1559 } |
OLD | NEW |