summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authortoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 05:25:01 +0000
committertoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 05:25:01 +0000
commit4454db048f0da8f1816bacf06efef0977e1f16fb (patch)
tree48eb72fad24e58425bdc3f3f9ab284aa43331311 /ppapi
parenta1e8efe270c244433c89a0c3f82ae3dcaad587b9 (diff)
downloadchromium_src-4454db048f0da8f1816bacf06efef0977e1f16fb.zip
chromium_src-4454db048f0da8f1816bacf06efef0977e1f16fb.tar.gz
chromium_src-4454db048f0da8f1816bacf06efef0977e1f16fb.tar.bz2
WebSocket Pepper API documents minor revision
BUG=87310 TEST=none Review URL: http://codereview.chromium.org/8572009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/dev/ppb_websocket_dev.idl34
-rw-r--r--ppapi/c/dev/ppb_websocket_dev.h36
-rw-r--r--ppapi/cpp/dev/websocket_dev.h4
3 files changed, 41 insertions, 33 deletions
diff --git a/ppapi/api/dev/ppb_websocket_dev.idl b/ppapi/api/dev/ppb_websocket_dev.idl
index c481910..6dd0bd8 100644
--- a/ppapi/api/dev/ppb_websocket_dev.idl
+++ b/ppapi/api/dev/ppb_websocket_dev.idl
@@ -19,6 +19,10 @@ label Chrome {
[assert_size(4)]
enum PP_WebSocketReadyState_Dev {
/**
+ * Ready state is queried on an invalid resource.
+ */
+ PP_WEBSOCKETREADYSTATE_INVALID_DEV = -1,
+ /**
* Ready state that the connection has not yet been established.
*/
PP_WEBSOCKETREADYSTATE_CONNECTING_DEV = 0,
@@ -232,9 +236,9 @@ interface PPB_WebSocket_Dev {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @return Returns a <code>PP_VARTYPE_NULL</code> var if called before the
- * close reason is set, or <code>PP_VARTYPE_UNDEFINED</code> if called on an
- * invalid resource.
+ * @return Returns a <code>PP_VARTYPE_STRING</code> var. if called before the
+ * close reason is set, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
PP_Var GetCloseReason([in] PP_Resource web_socket);
@@ -246,9 +250,9 @@ interface PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns <code>PP_FALSE</code> if called before the connection is
- * closed. Otherwise, returns <code>PP_TRUE</code> if the connection was
- * closed cleanly and returns <code>PP_FALSE</code> if the connection was
- * closed by abnormal reasons.
+ * closed, or called on an invalid resource. Otherwise, returns
+ * <code>PP_TRUE</code> if the connection was closed cleanly, or returns
+ * <code>PP_FALSE</code> if the connection was closed by abnormal reasons.
*/
PP_Bool GetCloseWasClean([in] PP_Resource web_socket);
@@ -260,9 +264,9 @@ interface PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established or called on an invalid resource, its data is
- * empty string.
- * Currently its data is always empty string.
+ * connection is established, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
+ * Currently its data for valid resources are always empty string.
*/
PP_Var GetExtensions([in] PP_Resource web_socket);
@@ -274,8 +278,8 @@ interface PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established, or called on an invalid resource, its data is
- * empty string.
+ * connection is established, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
PP_Var GetProtocol([in] PP_Resource web_socket);
@@ -286,8 +290,8 @@ interface PPB_WebSocket_Dev {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called
- * before the connection is established.
+ * @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID_DEV</code> if called
+ * before connect() is called, or called on an invalid resource.
*/
PP_WebSocketReadyState_Dev GetReadyState([in] PP_Resource web_socket);
@@ -298,8 +302,8 @@ interface PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established, or called on an invalid resource, its data is
- * empty string.
+ * connection is established, its data is empty string. Return a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
PP_Var GetURL([in] PP_Resource web_socket);
};
diff --git a/ppapi/c/dev/ppb_websocket_dev.h b/ppapi/c/dev/ppb_websocket_dev.h
index 2be0c76..0e54db1 100644
--- a/ppapi/c/dev/ppb_websocket_dev.h
+++ b/ppapi/c/dev/ppb_websocket_dev.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_websocket_dev.idl modified Mon Nov 7 15:21:42 2011. */
+/* From dev/ppb_websocket_dev.idl modified Wed Nov 16 02:46:08 2011. */
#ifndef PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_
#define PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_
@@ -36,6 +36,10 @@
*/
typedef enum {
/**
+ * Ready state is queried on an invalid resource.
+ */
+ PP_WEBSOCKETREADYSTATE_INVALID_DEV = -1,
+ /**
* Ready state that the connection has not yet been established.
*/
PP_WEBSOCKETREADYSTATE_CONNECTING_DEV = 0,
@@ -243,9 +247,9 @@ struct PPB_WebSocket_Dev {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @return Returns a <code>PP_VARTYPE_NULL</code> var if called before the
- * close reason is set, or <code>PP_VARTYPE_UNDEFINED</code> if called on an
- * invalid resource.
+ * @return Returns a <code>PP_VARTYPE_STRING</code> var. if called before the
+ * close reason is set, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
struct PP_Var (*GetCloseReason)(PP_Resource web_socket);
/**
@@ -256,9 +260,9 @@ struct PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns <code>PP_FALSE</code> if called before the connection is
- * closed. Otherwise, returns <code>PP_TRUE</code> if the connection was
- * closed cleanly and returns <code>PP_FALSE</code> if the connection was
- * closed by abnormal reasons.
+ * closed, or called on an invalid resource. Otherwise, returns
+ * <code>PP_TRUE</code> if the connection was closed cleanly, or returns
+ * <code>PP_FALSE</code> if the connection was closed by abnormal reasons.
*/
PP_Bool (*GetCloseWasClean)(PP_Resource web_socket);
/**
@@ -269,9 +273,9 @@ struct PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established or called on an invalid resource, its data is
- * empty string.
- * Currently its data is always empty string.
+ * connection is established, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
+ * Currently its data for valid resources are always empty string.
*/
struct PP_Var (*GetExtensions)(PP_Resource web_socket);
/**
@@ -282,8 +286,8 @@ struct PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established, or called on an invalid resource, its data is
- * empty string.
+ * connection is established, its data is empty string. Returns a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
struct PP_Var (*GetProtocol)(PP_Resource web_socket);
/**
@@ -293,8 +297,8 @@ struct PPB_WebSocket_Dev {
* @param[in] web_socket A <code>PP_Resource</code> corresponding to a
* WebSocket.
*
- * @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called
- * before the connection is established.
+ * @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID_DEV</code> if called
+ * before connect() is called, or called on an invalid resource.
*/
PP_WebSocketReadyState_Dev (*GetReadyState)(PP_Resource web_socket);
/**
@@ -304,8 +308,8 @@ struct PPB_WebSocket_Dev {
* WebSocket.
*
* @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
- * connection is established, or called on an invalid resource, its data is
- * empty string.
+ * connection is established, its data is empty string. Return a
+ * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
*/
struct PP_Var (*GetURL)(PP_Resource web_socket);
};
diff --git a/ppapi/cpp/dev/websocket_dev.h b/ppapi/cpp/dev/websocket_dev.h
index f7bca16..8b25b8e 100644
--- a/ppapi/cpp/dev/websocket_dev.h
+++ b/ppapi/cpp/dev/websocket_dev.h
@@ -105,8 +105,8 @@ class WebSocket_Dev : public Resource {
/// GetReadyState() returns the ready state of the specified WebSocket
/// connection.
///
- /// @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called
- /// before the connection is established.
+ /// @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID_DEV</code> if called
+ /// before connect() is called.
PP_WebSocketReadyState_Dev GetReadyState();
/// GetURL() returns the URL associated with specified WebSocket connection.