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

Side by Side Diff: ppapi/c/ppb_websocket.h

Issue 10169036: WebSocket Pepper API: the second Close() should not return error code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /* From ppb_websocket.idl modified Mon Mar 26 09:51:15 2012. */ 6 /* From ppb_websocket.idl modified Mon Apr 23 21:31:03 2012. */
7 7
8 #ifndef PPAPI_C_PPB_WEBSOCKET_H_ 8 #ifndef PPAPI_C_PPB_WEBSOCKET_H_
9 #define PPAPI_C_PPB_WEBSOCKET_H_ 9 #define PPAPI_C_PPB_WEBSOCKET_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 * connection. 264 * connection.
265 * 265 *
266 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 266 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
267 * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>reason</code> contains 267 * Returns <code>PP_ERROR_BADARGUMENT</code> if <code>reason</code> contains
268 * an invalid character as a UTF-8 string, or is longer than 123 bytes. 268 * an invalid character as a UTF-8 string, or is longer than 123 bytes.
269 * <code>PP_ERROR_BADARGUMENT</code> corresponds to a JavaScript SyntaxError 269 * <code>PP_ERROR_BADARGUMENT</code> corresponds to a JavaScript SyntaxError
270 * in the WebSocket API specification. 270 * in the WebSocket API specification.
271 * Returns <code>PP_ERROR_NOACCESS</code> if the code is not an integer 271 * Returns <code>PP_ERROR_NOACCESS</code> if the code is not an integer
272 * equal to 1000 or in the range 3000 to 4999. <code>PP_ERROR_NOACCESS</code> 272 * equal to 1000 or in the range 3000 to 4999. <code>PP_ERROR_NOACCESS</code>
273 * corresponds to an InvalidAccessError in the WebSocket API specification. 273 * corresponds to an InvalidAccessError in the WebSocket API specification.
274 * Returns <code>PP_ERROR_INPROGRESS</code> if this is not the first call to 274 * Returns <code>PP_ERROR_INPROGRESS</code> if previous call to Close() is
275 * Close(). 275 * not finished.
276 */ 276 */
277 int32_t (*Close)(PP_Resource web_socket, 277 int32_t (*Close)(PP_Resource web_socket,
278 uint16_t code, 278 uint16_t code,
279 struct PP_Var reason, 279 struct PP_Var reason,
280 struct PP_CompletionCallback callback); 280 struct PP_CompletionCallback callback);
281 /** 281 /**
282 * ReceiveMessage() receives a message from the WebSocket server. 282 * ReceiveMessage() receives a message from the WebSocket server.
283 * This interface only returns a single message. That is, this interface must 283 * This interface only returns a single message. That is, this interface must
284 * be called at least N times to receive N messages, no matter the size of 284 * be called at least N times to receive N messages, no matter the size of
285 * each message. 285 * each message.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 struct PP_Var (*GetURL)(PP_Resource web_socket); 425 struct PP_Var (*GetURL)(PP_Resource web_socket);
426 }; 426 };
427 427
428 typedef struct PPB_WebSocket_1_0 PPB_WebSocket; 428 typedef struct PPB_WebSocket_1_0 PPB_WebSocket;
429 /** 429 /**
430 * @} 430 * @}
431 */ 431 */
432 432
433 #endif /* PPAPI_C_PPB_WEBSOCKET_H_ */ 433 #endif /* PPAPI_C_PPB_WEBSOCKET_H_ */
434 434
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698