OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/api/app_runtime/app_runtime_api.h" | 5 #include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 webkit_glue::WebIntentReplyType reply_type = | 149 webkit_glue::WebIntentReplyType reply_type = |
150 webkit_glue::WEB_INTENT_REPLY_FAILURE; | 150 webkit_glue::WEB_INTENT_REPLY_FAILURE; |
151 bool success; | 151 bool success; |
152 EXTENSION_FUNCTION_VALIDATE(details->GetBoolean(kIntentSuccessKey, &success)); | 152 EXTENSION_FUNCTION_VALIDATE(details->GetBoolean(kIntentSuccessKey, &success)); |
153 if (success) | 153 if (success) |
154 reply_type = webkit_glue::WEB_INTENT_REPLY_SUCCESS; | 154 reply_type = webkit_glue::WEB_INTENT_REPLY_SUCCESS; |
155 | 155 |
156 std::string data; | 156 std::string data; |
157 EXTENSION_FUNCTION_VALIDATE(details->GetString(kIntentDataKey, &data)); | 157 EXTENSION_FUNCTION_VALIDATE(details->GetString(kIntentDataKey, &data)); |
158 | 158 |
159 intents_dispatcher->SendReplyMessage(reply_type, UTF8ToUTF16(data)); | 159 intents_dispatcher->SendReply(webkit_glue::WebIntentReply( |
| 160 reply_type, UTF8ToUTF16(data))); |
| 161 |
160 return true; | 162 return true; |
161 } | 163 } |
162 | 164 |
163 } // namespace extensions | 165 } // namespace extensions |
OLD | NEW |