OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 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 // The API specific scriptable object class. | 8 // The API specific scriptable object class. |
9 | 9 |
10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ | 10 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ |
11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ | 11 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ |
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <string.h> | 14 #include <string.h> |
15 | 15 |
16 #include <set> | 16 #include <set> |
17 | 17 |
18 #include "native_client/src/include/checked_cast.h" | 18 #include "native_client/src/include/checked_cast.h" |
19 #include "native_client/src/include/nacl_macros.h" | 19 #include "native_client/src/include/nacl_macros.h" |
20 #include "native_client/src/include/portability.h" | 20 #include "native_client/src/include/portability.h" |
21 #include "native_client/src/shared/npruntime/nacl_npapi.h" | 21 #include "native_client/src/shared/npruntime/nacl_npapi.h" |
22 #include "native_client/src/trusted/plugin/api_defines.h" | 22 #include "native_client/src/trusted/plugin/api_defines.h" |
23 #include "native_client/src/trusted/plugin/srpc/scriptable_handle.h" | 23 #include "native_client/src/trusted/plugin/scriptable_handle.h" |
24 #include "native_client/src/trusted/plugin/srpc/utility.h" | 24 #include "native_client/src/trusted/plugin/utility.h" |
25 | 25 |
26 namespace plugin { | 26 namespace plugin { |
27 | 27 |
28 // Forward declarations for externals. | 28 // Forward declarations for externals. |
29 class PortableHandle; | 29 class PortableHandle; |
30 | 30 |
31 // ScriptableImplNpapi encapsulates objects that are scriptable from NPAPI. | 31 // ScriptableImplNpapi encapsulates objects that are scriptable from NPAPI. |
32 class ScriptableImplNpapi: public NPObject, public plugin::ScriptableHandle { | 32 class ScriptableImplNpapi: public NPObject, public plugin::ScriptableHandle { |
33 public: | 33 public: |
34 // Create a new ScriptableImplNpapi. | 34 // Create a new ScriptableImplNpapi. |
(...skipping 14 matching lines...) Expand all Loading... |
49 // And we need to be able to delete objects when the ref count drops to | 49 // And we need to be able to delete objects when the ref count drops to |
50 // zero. To retain that Unref is the only interface that might cause | 50 // zero. To retain that Unref is the only interface that might cause |
51 // deletion, we need to have a method that can see the private destructor, | 51 // deletion, we need to have a method that can see the private destructor, |
52 // but can be invoked by NPAPI through the class table. | 52 // but can be invoked by NPAPI through the class table. |
53 static void Deallocate(NPObject* obj); | 53 static void Deallocate(NPObject* obj); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace plugin | 56 } // namespace plugin |
57 | 57 |
58 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ | 58 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NPAPI_SCRIPTABLE_IMPL_NPAPI_H_ |
OLD | NEW |