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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc

Issue 9192009: WebSocket Pepper API: make the API out of dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove binary type handling interfaces Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc
index a24c654c13a9b5e224bd50eeeb31ce7703e4440f..3cf459b8ba1d93d3e23d8420912302ed29361d85 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.cc
@@ -13,7 +13,7 @@
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_var.h"
-#include "ppapi/c/dev/ppb_websocket_dev.h"
+#include "ppapi/c/ppb_websocket.h"
#include "srpcgen/ppb_rpc.h"
namespace ppapi_proxy {
@@ -267,7 +267,7 @@ PP_Var GetProtocol(PP_Resource ws) {
return PP_MakeUndefined();
}
-PP_WebSocketReadyState_Dev GetReadyState(PP_Resource ws) {
+PP_WebSocketReadyState GetReadyState(PP_Resource ws) {
DebugPrintf(
"PPB_WebSocket::GetReadyState: ws=%"NACL_PRId32"\n", ws);
@@ -279,8 +279,8 @@ PP_WebSocketReadyState_Dev GetReadyState(PP_Resource ws) {
NaClSrpcErrorString(srpc_result));
if (srpc_result != NACL_SRPC_RESULT_OK)
- return PP_WEBSOCKETREADYSTATE_INVALID_DEV;
- return static_cast<PP_WebSocketReadyState_Dev>(ready_state);
+ return PP_WEBSOCKETREADYSTATE_INVALID;
+ return static_cast<PP_WebSocketReadyState>(ready_state);
}
PP_Var GetURL(PP_Resource ws) {
@@ -303,46 +303,10 @@ PP_Var GetURL(PP_Resource ws) {
return PP_MakeUndefined();
}
-PP_Bool SetBinaryType(PP_Resource ws,
- PP_WebSocketBinaryType_Dev binary_type) {
- DebugPrintf("PPB_WebSocket::SetBinaryType: ws=%"NACL_PRId32"\n", ws);
-
- int32_t success;
- NaClSrpcError srpc_result =
- PpbWebSocketRpcClient::PPB_WebSocket_SetBinaryType(
- GetMainSrpcChannel(),
- ws,
- static_cast<int32_t>(binary_type),
- &success);
- DebugPrintf("PPB_WebSocket::SetBinaryType: %s\n",
- NaClSrpcErrorString(srpc_result));
-
- if (srpc_result == NACL_SRPC_RESULT_OK && success)
- return PP_TRUE;
- return PP_FALSE;
-}
-
-PP_WebSocketBinaryType_Dev GetBinaryType(PP_Resource ws) {
- DebugPrintf("PPB_WebSocket::GetBinaryType: ws=%"NACL_PRId32"\n", ws);
-
- int32_t binary_type;
- NaClSrpcError srpc_result =
- PpbWebSocketRpcClient::PPB_WebSocket_GetBinaryType(
- GetMainSrpcChannel(),
- ws,
- &binary_type);
- DebugPrintf("PPB_WebSocket::GetBinaryType: %s\n",
- NaClSrpcErrorString(srpc_result));
-
- if (srpc_result != NACL_SRPC_RESULT_OK)
- return PP_WEBSOCKETBINARYTYPE_INVALID;
- return static_cast<PP_WebSocketBinaryType_Dev>(binary_type);
-}
-
} // namespace
-const PPB_WebSocket_Dev* PluginWebSocket::GetInterface() {
- static const PPB_WebSocket_Dev websocket_interface = {
+const PPB_WebSocket* PluginWebSocket::GetInterface() {
+ static const PPB_WebSocket websocket_interface = {
&Create,
&IsWebSocket,
&Connect,
@@ -357,8 +321,6 @@ const PPB_WebSocket_Dev* PluginWebSocket::GetInterface() {
&GetProtocol,
&GetReadyState,
&GetURL,
- &SetBinaryType,
- &GetBinaryType
};
return &websocket_interface;
}

Powered by Google App Engine
This is Rietveld 408576698