Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: src/shared/ppapi_proxy/browser_core.cc

Issue 5974006: Convert srpc definitions from using int64 to using PP_Instance, PP_Module, an... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2010 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/include/portability.h" 5 #include "native_client/src/include/portability.h"
6 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" 6 #include "native_client/src/shared/ppapi_proxy/browser_globals.h"
7 #include "srpcgen/ppb_rpc.h" 7 #include "srpcgen/ppb_rpc.h"
8 8
9 // 9 //
10 // The following methods are the SRPC dispatchers for ppapi/c/ppb_core.h. 10 // The following methods are the SRPC dispatchers for ppapi/c/ppb_core.h.
11 // 11 //
12 12
13 void PpbCoreRpcServer::PPB_Core_AddRefResource(NaClSrpcRpc* rpc, 13 void PpbCoreRpcServer::PPB_Core_AddRefResource(NaClSrpcRpc* rpc,
14 NaClSrpcClosure* done, 14 NaClSrpcClosure* done,
15 int64_t resource) { 15 PP_Resource resource) {
16 NaClSrpcClosureRunner runner(done); 16 NaClSrpcClosureRunner runner(done);
17 ppapi_proxy::PPBCoreInterface()->AddRefResource(resource); 17 ppapi_proxy::PPBCoreInterface()->AddRefResource(resource);
18 rpc->result = NACL_SRPC_RESULT_OK; 18 rpc->result = NACL_SRPC_RESULT_OK;
19 } 19 }
20 20
21 void PpbCoreRpcServer::PPB_Core_ReleaseResource(NaClSrpcRpc* rpc, 21 void PpbCoreRpcServer::PPB_Core_ReleaseResource(NaClSrpcRpc* rpc,
22 NaClSrpcClosure* done, 22 NaClSrpcClosure* done,
23 int64_t resource) { 23 PP_Resource resource) {
24 NaClSrpcClosureRunner runner(done); 24 NaClSrpcClosureRunner runner(done);
25 ppapi_proxy::PPBCoreInterface()->ReleaseResource(resource); 25 ppapi_proxy::PPBCoreInterface()->ReleaseResource(resource);
26 rpc->result = NACL_SRPC_RESULT_OK; 26 rpc->result = NACL_SRPC_RESULT_OK;
27 } 27 }
28 28
29 // MemAlloc and MemFree are handled locally to the plugin, and do not need a 29 // MemAlloc and MemFree are handled locally to the plugin, and do not need a
30 // browser stub. 30 // browser stub.
31 31
32 void PpbCoreRpcServer::PPB_Core_GetTime(NaClSrpcRpc* rpc, 32 void PpbCoreRpcServer::PPB_Core_GetTime(NaClSrpcRpc* rpc,
33 NaClSrpcClosure* done, 33 NaClSrpcClosure* done,
34 double* time) { 34 double* time) {
35 NaClSrpcClosureRunner runner(done); 35 NaClSrpcClosureRunner runner(done);
36 *time = ppapi_proxy::PPBCoreInterface()->GetTime(); 36 *time = ppapi_proxy::PPBCoreInterface()->GetTime();
37 rpc->result = NACL_SRPC_RESULT_OK; 37 rpc->result = NACL_SRPC_RESULT_OK;
38 } 38 }
39 39
40 // Release multiple references at once. 40 // Release multiple references at once.
41 void PpbCoreRpcServer::ReleaseResourceMultipleTimes(NaClSrpcRpc* rpc, 41 void PpbCoreRpcServer::ReleaseResourceMultipleTimes(NaClSrpcRpc* rpc,
42 NaClSrpcClosure* done, 42 NaClSrpcClosure* done,
43 int64_t resource, 43 PP_Resource resource,
44 int32_t count) { 44 int32_t count) {
45 NaClSrpcClosureRunner runner(done); 45 NaClSrpcClosureRunner runner(done);
46 while (count--) 46 while (count--)
47 ppapi_proxy::PPBCoreInterface()->ReleaseResource(resource); 47 ppapi_proxy::PPBCoreInterface()->ReleaseResource(resource);
48 rpc->result = NACL_SRPC_RESULT_OK; 48 rpc->result = NACL_SRPC_RESULT_OK;
49 } 49 }
50 50
51 51
52 // CallOnMainThread is handled on the upcall thread, where another RPC service 52 // CallOnMainThread is handled on the upcall thread, where another RPC service
53 // is exported. 53 // is exported.
54 // 54 //
55 // IsMainThread is handled locally to the plugin, and does not need a browser 55 // IsMainThread is handled locally to the plugin, and does not need a browser
56 // stub. 56 // stub.
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/browser_audio_config.cc ('k') | src/shared/ppapi_proxy/browser_graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698