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

Unified Diff: ppapi/api/ppb_websocket.idl

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
« no previous file with comments | « ppapi/api/dev/ppb_websocket_dev.idl ('k') | 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/ppb_websocket.idl
diff --git a/ppapi/api/dev/ppb_websocket_dev.idl b/ppapi/api/ppb_websocket.idl
similarity index 78%
rename from ppapi/api/dev/ppb_websocket_dev.idl
rename to ppapi/api/ppb_websocket.idl
index 0836038a639b019d28e28e48408abb293a2b0411..7dd42b115cd5a07bfe61a02b791eec3427fc6f14 100644
--- a/ppapi/api/dev/ppb_websocket_dev.idl
+++ b/ppapi/api/ppb_websocket.idl
@@ -4,11 +4,10 @@
*/
/**
- * This file defines the <code>PPB_WebSocket_Dev</code> interface.
+ * This file defines the <code>PPB_WebSocket</code> interface.
*/
label Chrome {
- M17 = 0.1,
- M18 = 0.9
+ M18 = 1.0
darin (slow to review) 2012/01/26 23:19:00 Generally speaking, I'd recommend breaking this CL
};
@@ -18,57 +17,34 @@ label Chrome {
* GetReadyState() returns one of these states.
*/
[assert_size(4)]
-enum PP_WebSocketReadyState_Dev {
+enum PP_WebSocketReadyState {
/**
* Ready state is queried on an invalid resource.
*/
- PP_WEBSOCKETREADYSTATE_INVALID_DEV = -1,
+ PP_WEBSOCKETREADYSTATE_INVALID = -1,
/**
* Ready state that the connection has not yet been established.
*/
- PP_WEBSOCKETREADYSTATE_CONNECTING_DEV = 0,
+ PP_WEBSOCKETREADYSTATE_CONNECTING = 0,
/**
* Ready state that the WebSocket connection is established and communication
* is possible.
*/
- PP_WEBSOCKETREADYSTATE_OPEN_DEV = 1,
+ PP_WEBSOCKETREADYSTATE_OPEN = 1,
/**
* Ready state that the connection is going through the closing handshake.
*/
- PP_WEBSOCKETREADYSTATE_CLOSING_DEV = 2,
+ PP_WEBSOCKETREADYSTATE_CLOSING = 2,
/**
* Ready state that the connection has been closed or could not be opened.
*/
- PP_WEBSOCKETREADYSTATE_CLOSED_DEV = 3
+ PP_WEBSOCKETREADYSTATE_CLOSED = 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 {
+interface PPB_WebSocket {
/**
* Create() creates a WebSocket instance.
*
@@ -88,9 +64,9 @@ interface PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns <code>PP_TRUE</code> if <code>resource</code> is a
- * <code>PPB_WebSocket_Dev</code>, <code>PP_FALSE</code> if the
+ * <code>PPB_WebSocket</code>, <code>PP_FALSE</code> if the
* <code>resource</code> is invalid or some type other than
- * <code>PPB_WebSocket_Dev</code>.
+ * <code>PPB_WebSocket</code>.
*/
PP_Bool IsWebSocket([in] PP_Resource resource);
@@ -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_BUFFER</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,12 +182,13 @@ 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
- * <code>PP_WEBSOCKETREADYSTATE_CONNECTING_DEV</code>. It corresponds
- * JavaScript InvalidStateError of the specification.
+ * <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code>. It corresponds JavaScript
+ * InvalidStateError of the specification.
* Returns <code>PP_ERROR_BADARGUMENT</code> if provided <code>message</code>
* of string type contains an invalid character as a UTF-8 string. It
* corresponds to JavaScript SyntaxError of the specification.
@@ -303,10 +282,10 @@ interface PPB_WebSocket_Dev {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID_DEV</code> if called
+ * @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID</code> if called
* before connect() is called, or called on an invalid resource.
*/
- PP_WebSocketReadyState_Dev GetReadyState([in] PP_Resource web_socket);
+ PP_WebSocketReadyState GetReadyState([in] PP_Resource web_socket);
/**
* GetURL() returns the URL associated with specified WebSocket connection.
@@ -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 | « ppapi/api/dev/ppb_websocket_dev.idl ('k') | ppapi/c/dev/ppb_websocket_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698