OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include "native_client/src/trusted/plugin/npapi/async_receive.h" | 7 #include "native_client/src/trusted/plugin/npapi/async_receive.h" |
8 | 8 |
9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" | 9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" |
| 10 #include "native_client/src/trusted/plugin/desc_based_handle.h" |
10 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h" | 11 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h" |
11 #include "native_client/src/trusted/plugin/srpc/desc_based_handle.h" | 12 #include "native_client/src/trusted/plugin/string_encoding.h" |
12 #include "native_client/src/trusted/plugin/srpc/string_encoding.h" | |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 struct ReceiveCallbackArgs { | 16 struct ReceiveCallbackArgs { |
17 NPP plugin; | 17 NPP plugin; |
18 NPObject* callback; | 18 NPObject* callback; |
19 char* data; | 19 char* data; |
20 size_t size; | 20 size_t size; |
21 }; | 21 }; |
22 | 22 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 NPN_PluginThreadAsyncCall(args->plugin, DoReceiveCallback, call); | 85 NPN_PluginThreadAsyncCall(args->plugin, DoReceiveCallback, call); |
86 } | 86 } |
87 | 87 |
88 args->socket->Delete(); | 88 args->socket->Delete(); |
89 NPN_PluginThreadAsyncCall(args->plugin, DoReleaseObject, args->callback); | 89 NPN_PluginThreadAsyncCall(args->plugin, DoReleaseObject, args->callback); |
90 free(buffer); | 90 free(buffer); |
91 delete args; | 91 delete args; |
92 } | 92 } |
93 | 93 |
94 } // namespace plugin | 94 } // namespace plugin |
OLD | NEW |