diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 09:25:45 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 09:25:45 +0000 |
commit | b6b90fed5146f71f39757249b00bfa3b9f40ac02 (patch) | |
tree | a4bb50304e9603399cb88def533deb9bed06658f /ppapi/api/ppb_websocket.idl | |
parent | 9d890b7e2e2eb291863f984e2ed3e50141d20cc8 (diff) | |
download | chromium_src-b6b90fed5146f71f39757249b00bfa3b9f40ac02.zip chromium_src-b6b90fed5146f71f39757249b00bfa3b9f40ac02.tar.gz chromium_src-b6b90fed5146f71f39757249b00bfa3b9f40ac02.tar.bz2 |
WebSocket Pepper API: allow to close connection without code and reason
- define PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED to close without status code
- omit reason for WebKit API explicitly when code is not specified
BUG=none
TEST=browser_tests --gtest_filter'PPAPI*WebSocket_*Close'
Review URL: https://chromiumcodereview.appspot.com/10332138
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139764 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/ppb_websocket.idl')
-rw-r--r-- | ppapi/api/ppb_websocket.idl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ppapi/api/ppb_websocket.idl b/ppapi/api/ppb_websocket.idl index 1e138bb..0069bb4a 100644 --- a/ppapi/api/ppb_websocket.idl +++ b/ppapi/api/ppb_websocket.idl @@ -58,6 +58,15 @@ enum PP_WebSocketReadyState { [assert_size(4)] enum PP_WebSocketCloseCode { /** + * Indicates to request closing connection without status code and reason. + * + * (Note that the code 1005 is forbidden to send in actual close frames by + * the RFC. PP_WebSocket reuses this code internally and the code will never + * appear in the actual close frames.) + */ + PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED = 1005, + + /** * Status codes in the range 0-999 are not used. */ @@ -244,7 +253,8 @@ interface PPB_WebSocket { * @param[in] web_socket A <code>PP_Resource</code> corresponding to a * WebSocket. * - * @param[in] code The WebSocket close code. This is ignored if it is 0. + * @param[in] code The WebSocket close code. This is ignored if it is + * <code>PP_WEBSOCKETSTATUSCODE_NOT_SPECIFIED</code>. * <code>PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE</code> must be used for the * usual case. To indicate some specific error cases, codes in the range * <code>PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN</code> to |