| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Chromium Authors. All rights reserved. | 2 * Copyright 2008 The Chromium 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 // Lookup table types for method dispatching. | 7 // Lookup table types for method dispatching. |
| 8 | 8 |
| 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H |
| 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H |
| 11 | 11 |
| 12 #include <limits.h> | 12 #include <limits.h> |
| 13 #include <map> | 13 #include <map> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "native_client/src/include/nacl_macros.h" | 16 #include "native_client/src/include/nacl_macros.h" |
| 17 #include "native_client/src/include/portability_string.h" | 17 #include "native_client/src/include/portability_string.h" |
| 18 #include "native_client/src/shared/srpc/nacl_srpc.h" | 18 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 19 | 19 |
| 20 namespace plugin { | 20 namespace plugin { |
| 21 | 21 |
| 22 class Plugin; | |
| 23 | |
| 24 bool InitSrpcArgArray(NaClSrpcArg* arr, int size); | 22 bool InitSrpcArgArray(NaClSrpcArg* arr, int size); |
| 25 void FreeSrpcArg(NaClSrpcArg* arg); | 23 void FreeSrpcArg(NaClSrpcArg* arg); |
| 26 | 24 |
| 27 // A utility class that builds and deletes parameter vectors used in rpcs. | 25 // A utility class that builds and deletes parameter vectors used in rpcs. |
| 28 class SrpcParams { | 26 class SrpcParams { |
| 29 public: | 27 public: |
| 30 SrpcParams() : exception_string_(NULL) { | 28 SrpcParams() : exception_string_(NULL) { |
| 31 memset(ins_, 0, sizeof(ins_)); | 29 memset(ins_, 0, sizeof(ins_)); |
| 32 memset(outs_, 0, sizeof(outs_)); | 30 memset(outs_, 0, sizeof(outs_)); |
| 33 } | 31 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 private: | 116 private: |
| 119 NACL_DISALLOW_COPY_AND_ASSIGN(MethodMap); | 117 NACL_DISALLOW_COPY_AND_ASSIGN(MethodMap); |
| 120 typedef std::map<uintptr_t, MethodInfo*> MethodMapStorage; | 118 typedef std::map<uintptr_t, MethodInfo*> MethodMapStorage; |
| 121 MethodMapStorage method_map_; | 119 MethodMapStorage method_map_; |
| 122 MethodMapKeys method_map_keys_; | 120 MethodMapKeys method_map_keys_; |
| 123 }; | 121 }; |
| 124 | 122 |
| 125 } // namespace plugin | 123 } // namespace plugin |
| 126 | 124 |
| 127 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H | 125 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_METHOD_MAP_H |
| OLD | NEW |