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 "content/renderer/web_intents_host.h" | 5 #include "content/renderer/web_intents_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/common/intents_messages.h" | 10 #include "content/common/intents_messages.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // reply.data_file_size); | 56 // reply.data_file_size); |
57 // v8::Handle<v8::Value> value = blob.toV8Value(); | 57 // v8::Handle<v8::Value> value = blob.toV8Value(); |
58 // return WebSerializedScriptValue::serialize(value); | 58 // return WebSerializedScriptValue::serialize(value); |
59 return WebSerializedScriptValue::fromString( | 59 return WebSerializedScriptValue::fromString( |
60 ASCIIToUTF16(reply.data_file.AsUTF8Unsafe())); | 60 ASCIIToUTF16(reply.data_file.AsUTF8Unsafe())); |
61 } else { | 61 } else { |
62 return WebSerializedScriptValue::fromString(reply.data); | 62 return WebSerializedScriptValue::fromString(reply.data); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 } // namespace | 66 } // namespace |
67 | 67 |
68 class DeliveredIntentClientImpl : public WebDeliveredIntentClient { | 68 class DeliveredIntentClientImpl : public WebDeliveredIntentClient { |
69 public: | 69 public: |
70 explicit DeliveredIntentClientImpl(WebIntentsHost* host) : host_(host) {} | 70 explicit DeliveredIntentClientImpl(WebIntentsHost* host) : host_(host) {} |
71 virtual ~DeliveredIntentClientImpl() {} | 71 virtual ~DeliveredIntentClientImpl() {} |
72 | 72 |
73 virtual void postResult(const WebSerializedScriptValue& data) const { | 73 virtual void postResult(const WebSerializedScriptValue& data) const { |
74 host_->OnResult(data.toString()); | 74 host_->OnResult(data.toString()); |
75 } | 75 } |
76 | 76 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 serialized_data.toString(), | 249 serialized_data.toString(), |
250 WebVector<WebString>(), WebVector<WebString>()); | 250 WebVector<WebString>(), WebVector<WebString>()); |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 NOTREACHED(); | 254 NOTREACHED(); |
255 return WebIntent(); | 255 return WebIntent(); |
256 } | 256 } |
257 | 257 |
258 } // namespace content | 258 } // namespace content |
OLD | NEW |