OLD | NEW |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" | 5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" |
6 | 6 |
7 #include "native_client/src/include/nacl_scoped_ptr.h" | 7 #include "native_client/src/include/nacl_scoped_ptr.h" |
8 #include "native_client/src/include/portability.h" | 8 #include "native_client/src/include/portability.h" |
9 #include "native_client/src/shared/ppapi_proxy/object_serialize.h" | 9 #include "native_client/src/shared/ppapi_proxy/object_serialize.h" |
10 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" | 10 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 PpbTestingRpcClient::PPB_Testing_GetLiveObjectsForInstance( | 82 PpbTestingRpcClient::PPB_Testing_GetLiveObjectsForInstance( |
83 GetMainSrpcChannel(), | 83 GetMainSrpcChannel(), |
84 instance, | 84 instance, |
85 &live_object_count); | 85 &live_object_count); |
86 | 86 |
87 DebugPrintf("PPB_Testing::GetLiveObjectsForInstance: %s\n", | 87 DebugPrintf("PPB_Testing::GetLiveObjectsForInstance: %s\n", |
88 NaClSrpcErrorString(srpc_result)); | 88 NaClSrpcErrorString(srpc_result)); |
89 return live_object_count; | 89 return live_object_count; |
90 } | 90 } |
91 | 91 |
| 92 PP_Bool IsOutOfProcess() { |
| 93 // The NaCl plugin is run in-process, and all calls are synchronous, so even |
| 94 // though a NaCl module runs in a separate process, it behaves as if it were |
| 95 // in-process. Furthermore, calls off of the main thread are not supported |
| 96 // (same as trusted in-process). |
| 97 return PP_FALSE; |
| 98 } |
| 99 |
92 } // namespace | 100 } // namespace |
93 | 101 |
94 const PPB_Testing_Dev* PluginTesting::GetInterface() { | 102 const PPB_Testing_Dev* PluginTesting::GetInterface() { |
95 static const PPB_Testing_Dev testing_interface = { | 103 static const PPB_Testing_Dev testing_interface = { |
96 ReadImageData, | 104 ReadImageData, |
97 RunMessageLoop, | 105 RunMessageLoop, |
98 QuitMessageLoop, | 106 QuitMessageLoop, |
99 GetLiveObjectsForInstance | 107 GetLiveObjectsForInstance, |
| 108 IsOutOfProcess |
100 }; | 109 }; |
101 return &testing_interface; | 110 return &testing_interface; |
102 } | 111 } |
103 | 112 |
104 } // namespace ppapi_proxy | 113 } // namespace ppapi_proxy |
OLD | NEW |