| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1005 |
| 1006 return_value->Set(L"history", history_list); | 1006 return_value->Set(L"history", history_list); |
| 1007 // Return history info. | 1007 // Return history info. |
| 1008 base::JSONWriter::Write(return_value.get(), false, &json_return); | 1008 base::JSONWriter::Write(return_value.get(), false, &json_return); |
| 1009 AutomationMsg_SendJSONRequest::WriteReplyParams( | 1009 AutomationMsg_SendJSONRequest::WriteReplyParams( |
| 1010 reply_message_, json_return, reply_return); | 1010 reply_message_, json_return, reply_return); |
| 1011 provider_->Send(reply_message_); | 1011 provider_->Send(reply_message_); |
| 1012 delete this; | 1012 delete this; |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 void AutomationProviderImportSettingsObserver::ImportEnded() { |
| 1016 // Send back an empty success message. |
| 1017 AutomationMsg_SendJSONRequest::WriteReplyParams( |
| 1018 reply_message_, std::string("{}"), true); |
| 1019 provider_->Send(reply_message_); |
| 1020 delete this; |
| 1021 } |
| 1022 |
| 1015 void AutomationProviderBrowsingDataObserver::OnBrowsingDataRemoverDone() { | 1023 void AutomationProviderBrowsingDataObserver::OnBrowsingDataRemoverDone() { |
| 1016 // Send back an empty success message | 1024 // Send back an empty success message |
| 1017 AutomationMsg_SendJSONRequest::WriteReplyParams( | 1025 AutomationMsg_SendJSONRequest::WriteReplyParams( |
| 1018 reply_message_, std::string("{}"), true); | 1026 reply_message_, std::string("{}"), true); |
| 1019 provider_->Send(reply_message_); | 1027 provider_->Send(reply_message_); |
| 1020 delete this; | 1028 delete this; |
| 1021 } | 1029 } |
| 1022 | 1030 |
| 1023 OmniboxAcceptNotificationObserver::OmniboxAcceptNotificationObserver( | 1031 OmniboxAcceptNotificationObserver::OmniboxAcceptNotificationObserver( |
| 1024 NavigationController* controller, | 1032 NavigationController* controller, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 const NotificationDetails& details) { | 1076 const NotificationDetails& details) { |
| 1069 if (type == NotificationType::SAVE_PACKAGE_SUCCESSFULLY_FINISHED) { | 1077 if (type == NotificationType::SAVE_PACKAGE_SUCCESSFULLY_FINISHED) { |
| 1070 AutomationMsg_SendJSONRequest::WriteReplyParams( | 1078 AutomationMsg_SendJSONRequest::WriteReplyParams( |
| 1071 reply_message_, std::string("{}"), true); | 1079 reply_message_, std::string("{}"), true); |
| 1072 automation_->Send(reply_message_); | 1080 automation_->Send(reply_message_); |
| 1073 delete this; | 1081 delete this; |
| 1074 } else { | 1082 } else { |
| 1075 NOTREACHED(); | 1083 NOTREACHED(); |
| 1076 } | 1084 } |
| 1077 } | 1085 } |
| OLD | NEW |