OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 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 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include "native_client/src/include/checked_cast.h" | 10 #include "native_client/src/include/checked_cast.h" |
11 #include "native_client/src/trusted/plugin/npapi/ret_array.h" | 11 #include "native_client/src/trusted/plugin/npapi/ret_array.h" |
12 #include "native_client/src/trusted/plugin/srpc/utility.h" | 12 #include "native_client/src/trusted/plugin/utility.h" |
13 | 13 |
14 using nacl::assert_cast; | 14 using nacl::assert_cast; |
15 | 15 |
16 namespace plugin { | 16 namespace plugin { |
17 | 17 |
18 RetArray::RetArray(NPP npp) : npp_(npp) { | 18 RetArray::RetArray(NPP npp) : npp_(npp) { |
19 PLUGIN_PRINTF(("RetArray::RetArray(%p)\n", static_cast<void*>(this))); | 19 PLUGIN_PRINTF(("RetArray::RetArray(%p)\n", static_cast<void*>(this))); |
20 | 20 |
21 NPObject* window; | 21 NPObject* window; |
22 NPN_GetValue(npp_, NPNVWindowNPObject, &window); | 22 NPN_GetValue(npp_, NPNVWindowNPObject, &window); |
(...skipping 26 matching lines...) Expand all Loading... |
49 memcpy(copy, &array_, sizeof(NPVariant)); | 49 memcpy(copy, &array_, sizeof(NPVariant)); |
50 return true; | 50 return true; |
51 } | 51 } |
52 | 52 |
53 NPObject* RetArray::ExportObject() { | 53 NPObject* RetArray::ExportObject() { |
54 return NPN_RetainObject(NPVARIANT_TO_OBJECT(array_)); | 54 return NPN_RetainObject(NPVARIANT_TO_OBJECT(array_)); |
55 } | 55 } |
56 | 56 |
57 | 57 |
58 } // namespace plugin | 58 } // namespace plugin |
OLD | NEW |