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

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

Issue 6177007: ppapi_proxy: Support loading and reading urls. Proxy URLLoader.... (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 // SRPC-abstraction wrappers around PPB_Instance functions. 5 // SRPC-abstraction wrappers around PPB_Instance functions.
6 6
7 #include "native_client/src/include/nacl_macros.h" 7 #include "native_client/src/include/nacl_macros.h"
8 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" 8 #include "native_client/src/shared/ppapi_proxy/browser_globals.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 "srpcgen/ppb_rpc.h" 10 #include "srpcgen/ppb_rpc.h"
11 11
12 void PpbInstanceRpcServer::PPB_Instance_GetWindowObject( 12 void PpbInstanceRpcServer::PPB_Instance_GetWindowObject(
13 NaClSrpcRpc* rpc, 13 NaClSrpcRpc* rpc,
14 NaClSrpcClosure* done, 14 NaClSrpcClosure* done,
15 // inputs 15 // inputs
16 PP_Instance instance, 16 PP_Instance instance,
17 // outputs 17 // outputs
18 nacl_abi_size_t* window_size, char* window_bytes) { 18 nacl_abi_size_t* window_size, char* window_bytes) {
19 NACL_UNTESTED();
20 NaClSrpcClosureRunner runner(done); 19 NaClSrpcClosureRunner runner(done);
21 rpc->result = NACL_SRPC_RESULT_APP_ERROR; 20 rpc->result = NACL_SRPC_RESULT_APP_ERROR;
22 21
23 PP_Var window = 22 PP_Var window =
24 ppapi_proxy::PPBInstanceInterface()->GetWindowObject(instance); 23 ppapi_proxy::PPBInstanceInterface()->GetWindowObject(instance);
25 if (!ppapi_proxy::SerializeTo(&window, window_bytes, window_size)) 24 if (!ppapi_proxy::SerializeTo(&window, window_bytes, window_size))
26 return; 25 return;
27 26
28 rpc->result = NACL_SRPC_RESULT_OK; 27 rpc->result = NACL_SRPC_RESULT_OK;
29 } 28 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 PP_Var result = 109 PP_Var result =
111 ppapi_proxy::PPBInstanceInterface()->ExecuteScript( 110 ppapi_proxy::PPBInstanceInterface()->ExecuteScript(
112 instance, script, &exception); 111 instance, script, &exception);
113 if (!ppapi_proxy::SerializeTo(&result, result_bytes, result_size)) 112 if (!ppapi_proxy::SerializeTo(&result, result_bytes, result_size))
114 return; 113 return;
115 if (!ppapi_proxy::SerializeTo(&exception, exception_bytes, exception_size)) 114 if (!ppapi_proxy::SerializeTo(&exception, exception_bytes, exception_size))
116 return; 115 return;
117 116
118 rpc->result = NACL_SRPC_RESULT_OK; 117 rpc->result = NACL_SRPC_RESULT_OK;
119 } 118 }
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/browser_globals.cc ('k') | src/shared/ppapi_proxy/browser_ppb_url_loader_rpc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698