| 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 #ifndef NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ | 8 #ifndef NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ |
| 9 #define NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ | 9 #define NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ |
| 10 | 10 |
| 11 #include "native_client/src/include/checked_cast.h" | 11 #include "native_client/src/include/checked_cast.h" |
| 12 #include "native_client/src/shared/srpc/nacl_srpc.h" | 12 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 13 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 13 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
| 14 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" | 14 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" |
| 15 #include "native_client/src/trusted/plugin/npapi/ret_array.h" | 15 #include "native_client/src/trusted/plugin/npapi/ret_array.h" |
| 16 #include "native_client/src/trusted/plugin/srpc/utility.h" | 16 #include "native_client/src/trusted/plugin/utility.h" |
| 17 | 17 |
| 18 #ifndef SIZE_T_MAX | 18 #ifndef SIZE_T_MAX |
| 19 # define SIZE_T_MAX (~((size_t) 0)) | 19 # define SIZE_T_MAX (~((size_t) 0)) |
| 20 #endif // SIZE_T_MAX | 20 #endif // SIZE_T_MAX |
| 21 | 21 |
| 22 namespace plugin { | 22 namespace plugin { |
| 23 | 23 |
| 24 // A utility method that gets the length value from an array NPVariant. | 24 // A utility method that gets the length value from an array NPVariant. |
| 25 // It returns true if the NPVariant is an array, false otherwise. | 25 // It returns true if the NPVariant is an array, false otherwise. |
| 26 extern bool NPVariantObjectLength(const NPVariant* variant, | 26 extern bool NPVariantObjectLength(const NPVariant* variant, |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 // Make the element count and data available to the caller. | 193 // Make the element count and data available to the caller. |
| 194 *array_length = nacl::assert_cast<uint32_t>(element_count); | 194 *array_length = nacl::assert_cast<uint32_t>(element_count); |
| 195 *array_data = tmp_array_data; | 195 *array_data = tmp_array_data; |
| 196 return true; | 196 return true; |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace plugin | 199 } // namespace plugin |
| 200 | 200 |
| 201 #endif // NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ | 201 #endif // NATIVE_CLIENT_NPAPI_PLUGIN_NPAPI_NPAPI_NATIVE_H_ |
| OLD | NEW |