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

Unified Diff: ppapi/cpp/websocket.h

Issue 10332138: WebSocket Pepper API: allow to close connection without code and reason (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint16_t -> enum Created 8 years, 7 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
Index: ppapi/cpp/websocket.h
diff --git a/ppapi/cpp/websocket.h b/ppapi/cpp/websocket.h
index a34fdb7731ebfad36af041788f3a2e2c389340f5..89cd782fc043b05f5de72cb926d2d9c0a924fbeb 100644
--- a/ppapi/cpp/websocket.h
+++ b/ppapi/cpp/websocket.h
@@ -70,7 +70,8 @@ class WebSocket : public Resource {
/// Close() closes the specified WebSocket connection by specifying
/// <code>code</code> and <code>reason</code>.
///
- /// @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
@@ -95,7 +96,7 @@ class WebSocket : public Resource {
/// <code>PP_ERROR_NOACCESS</code> corresponds to an InvalidAccessError in
/// the WebSocket API specification. Returns <code>PP_ERROR_INPROGRESS</code>
/// if a previous call to Close() is not finished.
- int32_t Close(uint16_t code, const Var& reason,
+ int32_t Close(PP_WebSocketStatusCode code, const Var& reason,
const CompletionCallback& callback);
/// ReceiveMessage() receives a message from the WebSocket server.

Powered by Google App Engine
This is Rietveld 408576698