| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 543 } |
| 544 | 544 |
| 545 automation_->Send(reply_message_); | 545 automation_->Send(reply_message_); |
| 546 delete this; | 546 delete this; |
| 547 } | 547 } |
| 548 | 548 |
| 549 ExtensionUnloadNotificationObserver::ExtensionUnloadNotificationObserver() | 549 ExtensionUnloadNotificationObserver::ExtensionUnloadNotificationObserver() |
| 550 : did_receive_unload_notification_(false) { | 550 : did_receive_unload_notification_(false) { |
| 551 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, | 551 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, |
| 552 NotificationService::AllSources()); | 552 NotificationService::AllSources()); |
| 553 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, | |
| 554 NotificationService::AllSources()); | |
| 555 } | 553 } |
| 556 | 554 |
| 557 ExtensionUnloadNotificationObserver::~ExtensionUnloadNotificationObserver() { | 555 ExtensionUnloadNotificationObserver::~ExtensionUnloadNotificationObserver() { |
| 558 } | 556 } |
| 559 | 557 |
| 560 void ExtensionUnloadNotificationObserver::Observe( | 558 void ExtensionUnloadNotificationObserver::Observe( |
| 561 NotificationType type, const NotificationSource& source, | 559 NotificationType type, const NotificationSource& source, |
| 562 const NotificationDetails& details) { | 560 const NotificationDetails& details) { |
| 563 if (type.value == NotificationType::EXTENSION_UNLOADED || | 561 if (type.value == NotificationType::EXTENSION_UNLOADED) { |
| 564 type.value == NotificationType::EXTENSION_UNLOADED_DISABLED) { | |
| 565 did_receive_unload_notification_ = true; | 562 did_receive_unload_notification_ = true; |
| 566 } else { | 563 } else { |
| 567 NOTREACHED(); | 564 NOTREACHED(); |
| 568 } | 565 } |
| 569 } | 566 } |
| 570 | 567 |
| 571 ExtensionTestResultNotificationObserver:: | 568 ExtensionTestResultNotificationObserver:: |
| 572 ExtensionTestResultNotificationObserver(AutomationProvider* automation) | 569 ExtensionTestResultNotificationObserver(AutomationProvider* automation) |
| 573 : automation_(automation) { | 570 : automation_(automation) { |
| 574 registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED, | 571 registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED, |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 NotificationService::AllSources()); | 1629 NotificationService::AllSources()); |
| 1633 } | 1630 } |
| 1634 | 1631 |
| 1635 void RendererProcessClosedObserver::Observe( | 1632 void RendererProcessClosedObserver::Observe( |
| 1636 NotificationType type, | 1633 NotificationType type, |
| 1637 const NotificationSource& source, | 1634 const NotificationSource& source, |
| 1638 const NotificationDetails& details) { | 1635 const NotificationDetails& details) { |
| 1639 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); | 1636 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); |
| 1640 delete this; | 1637 delete this; |
| 1641 } | 1638 } |
| OLD | NEW |