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

Unified Diff: ppapi/api/dev/ppb_websocket_dev.idl

Issue 9296001: WebSocket Pepper API: Remove binary type handling interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_websocket_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/dev/ppb_websocket_dev.idl
diff --git a/ppapi/api/dev/ppb_websocket_dev.idl b/ppapi/api/dev/ppb_websocket_dev.idl
index 0836038a639b019d28e28e48408abb293a2b0411..0a68e7c60be937302eb867a5cc3df2b863020b20 100644
--- a/ppapi/api/dev/ppb_websocket_dev.idl
+++ b/ppapi/api/dev/ppb_websocket_dev.idl
@@ -7,8 +7,7 @@
* This file defines the <code>PPB_WebSocket_Dev</code> interface.
*/
label Chrome {
- M17 = 0.1,
- M18 = 0.9
+ M17 = 0.1
};
@@ -45,29 +44,6 @@ enum PP_WebSocketReadyState_Dev {
PP_WEBSOCKETREADYSTATE_CLOSED_DEV = 3
};
-/**
- * This enumeration contains the types representing the WebSocket binary type
- * to receive frames. These types are based on the JavaScript WebSocket API
- * specification.
- */
-[assert_size(4)]
-enum PP_WebSocketBinaryType_Dev {
- /**
- * Binary type is queried on an invalid resource.
- */
- PP_WEBSOCKETBINARYTYPE_INVALID = -1,
-
- /**
- * Binary type that represents Blob objects.
- */
- PP_WEBSOCKETBINARYTYPE_BLOB_DEV = 0,
-
- /**
- * Binary type that represents ArrayBuffer objects.
- */
- PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV = 1
-};
-
interface PPB_WebSocket_Dev {
/**
* Create() creates a WebSocket instance.
@@ -180,7 +156,9 @@ interface PPB_WebSocket_Dev {
*
* @param[out] message The received message is copied to provided
* <code>message</code>. The <code>message</code> must remain valid until
- * the ReceiveMessage operation completes.
+ * the ReceiveMessage operation completes. Its <code>PP_VarType</code>
+ * will be <code>PP_VARTYPE_STRING</code> or
+ * <code>PP_VARTYPE_ARRAY_BYFFER</code> on receiving.
*
* @param[in] callback A <code>PP_CompletionCallback</code> which is called
* when the receiving message is completed. It is ignored if ReceiveMessage
@@ -204,7 +182,8 @@ interface PPB_WebSocket_Dev {
*
* @param[in] message A message to send. The message is copied to internal
* buffer. So caller can free <code>message</code> safely after returning
- * from the function.
+ * from the function. Its <code>PP_VarType</code> must be
+ * <code>PP_VARTYPE_STRING</code> or <code>PP_VARTYPE_ARRAY_BUFFER</code>.
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
* Returns <code>PP_ERROR_FAILED</code> if the ReadyState is
@@ -319,43 +298,4 @@ interface PPB_WebSocket_Dev {
* <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
PP_Var GetURL([in] PP_Resource web_socket);
-
- /**
- * SetBinaryType() specifies the binary object type for receiving binary
- * frames representation. Receiving text frames are always mapped to
- * <PP_VARTYPE_STRING</code> var regardless of this attribute.
- * This function should be called before Connect() to ensure receiving all
- * incoming binary frames as the specified binary object type.
- * Default type is <code>PP_WEBSOCKETBINARYTYPE_BLOB_DEV</code>.
- *
- * Currently, Blob bindings is not supported in Pepper, so receiving binary
- * type is always ArrayBuffer. To ensure backward compatibility, you must
- * call this function with
- * <code>PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV</code> to use binary frames.
- *
- * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
- * WebSocket.
- *
- * @param[in] binary_type Binary object type for receiving binary frames
- * representation.
- *
- * @return Returns <code>PP_FALSE</code> if the specified type is not
- * supported. Otherwise, returns <code>PP_TRUE</code>.
- */
- [version=0.9]
- PP_Bool SetBinaryType([in] PP_Resource web_socket,
- [in] PP_WebSocketBinaryType_Dev binary_type);
-
- /**
- * GetBinaryType() returns the currently specified binary object type for
- * receiving binary frames.
- *
- * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
- * WebSocket.
- *
- * @return Returns <code>PP_WebSocketBinaryType_Dev</code> represents the
- * current binary object type.
- */
- [version=0.9]
- PP_WebSocketBinaryType_Dev GetBinaryType([in] PP_Resource web_socket);
};
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_websocket_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698