| 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 // NPAPI Scriptable handle implementation. | 8 // NPAPI Scriptable handle implementation. |
| 9 | 9 |
| 10 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h" | 10 #include "native_client/src/trusted/plugin/npapi/scriptable_impl_npapi.h" |
| 11 | 11 |
| 12 #include <stdio.h> | 12 #include <stdio.h> |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 | 14 |
| 15 #include <set> | 15 #include <set> |
| 16 | 16 |
| 17 #include "native_client/src/include/checked_cast.h" | 17 #include "native_client/src/include/checked_cast.h" |
| 18 #include "native_client/src/include/portability.h" | 18 #include "native_client/src/include/portability.h" |
| 19 #include "third_party/npapi/bindings/npapi.h" | 19 #include "third_party/npapi/bindings/npapi.h" |
| 20 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 20 #include "native_client/src/trusted/plugin/npapi/browser_impl_npapi.h" | 21 #include "native_client/src/trusted/plugin/npapi/browser_impl_npapi.h" |
| 21 #include "native_client/src/trusted/plugin/npapi/npapi_native.h" | 22 #include "native_client/src/trusted/plugin/npapi/npapi_native.h" |
| 22 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" | 23 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" |
| 23 #include "native_client/src/trusted/plugin/npapi/ret_array.h" | 24 #include "native_client/src/trusted/plugin/npapi/ret_array.h" |
| 24 #include "native_client/src/trusted/plugin/srpc/socket_address.h" | 25 #include "native_client/src/trusted/plugin/socket_address.h" |
| 25 #include "native_client/src/trusted/plugin/srpc/utility.h" | 26 #include "native_client/src/trusted/plugin/utility.h" |
| 26 #include "native_client/src/shared/srpc/nacl_srpc.h" | |
| 27 | 27 |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // Functions for marshalling arguments from NPAPI world into NaCl SRPC and | 31 // Functions for marshalling arguments from NPAPI world into NaCl SRPC and |
| 32 // vice versa. | 32 // vice versa. |
| 33 | 33 |
| 34 uint32_t ArgsLength(const NaClSrpcArg* index[]) { | 34 uint32_t ArgsLength(const NaClSrpcArg* index[]) { |
| 35 uint32_t i; | 35 uint32_t i; |
| 36 for (i = 0; (i < NACL_SRPC_MAX_ARGS) && NULL != index[i]; ++i) { | 36 for (i = 0; (i < NACL_SRPC_MAX_ARGS) && NULL != index[i]; ++i) { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 } | 747 } |
| 748 | 748 |
| 749 ScriptableImplNpapi::ScriptableImplNpapi(PortableHandle* handle) | 749 ScriptableImplNpapi::ScriptableImplNpapi(PortableHandle* handle) |
| 750 : ScriptableHandle(handle) { | 750 : ScriptableHandle(handle) { |
| 751 PLUGIN_PRINTF(("ScriptableImplNpapi::ScriptableImplNpapi(%p, %p)\n", | 751 PLUGIN_PRINTF(("ScriptableImplNpapi::ScriptableImplNpapi(%p, %p)\n", |
| 752 static_cast<void*>(this), | 752 static_cast<void*>(this), |
| 753 static_cast<void*>(handle))); | 753 static_cast<void*>(handle))); |
| 754 } | 754 } |
| 755 | 755 |
| 756 } // namespace plugin | 756 } // namespace plugin |
| OLD | NEW |