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