| 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 return result; | 816 return result; |
| 817 } | 817 } |
| 818 | 818 |
| 819 void ExecuteBrowserCommandObserver::Observe( | 819 void ExecuteBrowserCommandObserver::Observe( |
| 820 NotificationType type, const NotificationSource& source, | 820 NotificationType type, const NotificationSource& source, |
| 821 const NotificationDetails& details) { | 821 const NotificationDetails& details) { |
| 822 if (type == notification_type_) { | 822 if (type == notification_type_) { |
| 823 AutomationMsg_WindowExecuteCommand::WriteReplyParams(reply_message_, | 823 AutomationMsg_WindowExecuteCommand::WriteReplyParams(reply_message_, |
| 824 true); | 824 true); |
| 825 automation_->Send(reply_message_); | 825 automation_->Send(reply_message_); |
| 826 reply_message_ = NULL; |
| 826 delete this; | 827 delete this; |
| 827 } else { | 828 } else { |
| 828 NOTREACHED(); | 829 NOTREACHED(); |
| 829 } | 830 } |
| 830 } | 831 } |
| 831 | 832 |
| 832 ExecuteBrowserCommandObserver::ExecuteBrowserCommandObserver( | 833 ExecuteBrowserCommandObserver::ExecuteBrowserCommandObserver( |
| 833 AutomationProvider* automation, IPC::Message* reply_message) | 834 AutomationProvider* automation, IPC::Message* reply_message) |
| 834 : automation_(automation), | 835 : automation_(automation), |
| 835 notification_type_(NotificationType::ALL), | 836 notification_type_(NotificationType::ALL), |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 NotificationService::AllSources()); | 1631 NotificationService::AllSources()); |
| 1631 } | 1632 } |
| 1632 | 1633 |
| 1633 void RendererProcessClosedObserver::Observe( | 1634 void RendererProcessClosedObserver::Observe( |
| 1634 NotificationType type, | 1635 NotificationType type, |
| 1635 const NotificationSource& source, | 1636 const NotificationSource& source, |
| 1636 const NotificationDetails& details) { | 1637 const NotificationDetails& details) { |
| 1637 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); | 1638 AutomationJSONReply(automation_, reply_message_).SendSuccess(NULL); |
| 1638 delete this; | 1639 delete this; |
| 1639 } | 1640 } |
| OLD | NEW |