| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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_WebSocket functions. | 5 // SRPC-abstraction wrappers around PPB_WebSocket functions. |
| 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/shared/ppapi_proxy/browser_callback.h" | 8 #include "native_client/src/shared/ppapi_proxy/browser_callback.h" |
| 9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" | 9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
| 10 #include "native_client/src/shared/ppapi_proxy/object_serialize.h" | 10 #include "native_client/src/shared/ppapi_proxy/object_serialize.h" |
| 11 #include "native_client/src/shared/ppapi_proxy/utility.h" | 11 #include "native_client/src/shared/ppapi_proxy/utility.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_errors.h" | 13 #include "ppapi/c/pp_errors.h" |
| 14 #include "ppapi/c/dev/ppb_websocket_dev.h" | |
| 15 #include "srpcgen/ppb_rpc.h" | 14 #include "srpcgen/ppb_rpc.h" |
| 15 #include "ppapi/c/ppb_websocket.h" |
| 16 | 16 |
| 17 using ppapi_proxy::DebugPrintf; | 17 using ppapi_proxy::DebugPrintf; |
| 18 using ppapi_proxy::DeleteRemoteCallbackInfo; | 18 using ppapi_proxy::DeleteRemoteCallbackInfo; |
| 19 using ppapi_proxy::DeserializeTo; | 19 using ppapi_proxy::DeserializeTo; |
| 20 using ppapi_proxy::MakeRemoteCompletionCallback; | 20 using ppapi_proxy::MakeRemoteCompletionCallback; |
| 21 using ppapi_proxy::PPBWebSocketInterface; | 21 using ppapi_proxy::PPBWebSocketInterface; |
| 22 using ppapi_proxy::SerializeTo; | 22 using ppapi_proxy::SerializeTo; |
| 23 | 23 |
| 24 void PpbWebSocketRpcServer::PPB_WebSocket_Create( | 24 void PpbWebSocketRpcServer::PPB_WebSocket_Create( |
| 25 NaClSrpcRpc* rpc, | 25 NaClSrpcRpc* rpc, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 char* url_bytes) { | 314 char* url_bytes) { |
| 315 NaClSrpcClosureRunner runner(done); | 315 NaClSrpcClosureRunner runner(done); |
| 316 rpc->result = NACL_SRPC_RESULT_APP_ERROR; | 316 rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| 317 | 317 |
| 318 PP_Var url = PPBWebSocketInterface()->GetURL(ws); | 318 PP_Var url = PPBWebSocketInterface()->GetURL(ws); |
| 319 DebugPrintf("PPB_WebSocket::GetURL:: url.type=%d\n", url.type); | 319 DebugPrintf("PPB_WebSocket::GetURL:: url.type=%d\n", url.type); |
| 320 | 320 |
| 321 if (SerializeTo(&url, url_bytes, url_size)) | 321 if (SerializeTo(&url, url_bytes, url_size)) |
| 322 rpc->result = NACL_SRPC_RESULT_OK; | 322 rpc->result = NACL_SRPC_RESULT_OK; |
| 323 } | 323 } |
| OLD | NEW |