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

Side by Side Diff: ppapi/cpp/dev/websocket_dev.h

Issue 8572009: WebSocket Pepper API documents minor revision (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed reviewed point Created 9 years, 1 month 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
« no previous file with comments | « ppapi/c/dev/ppb_websocket_dev.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef PPAPI_CPP_DEV_WEBSOCKET_DEV_H_ 5 #ifndef PPAPI_CPP_DEV_WEBSOCKET_DEV_H_
6 #define PPAPI_CPP_DEV_WEBSOCKET_DEV_H_ 6 #define PPAPI_CPP_DEV_WEBSOCKET_DEV_H_
7 7
8 #include "ppapi/c/dev/ppb_websocket_dev.h" 8 #include "ppapi/c/dev/ppb_websocket_dev.h"
9 9
10 /// @file 10 /// @file
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 /// GetProtocol() returns the sub-protocol chosen by the server for the 98 /// GetProtocol() returns the sub-protocol chosen by the server for the
99 /// specified WebSocket connection. 99 /// specified WebSocket connection.
100 /// 100 ///
101 /// @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before 101 /// @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before
102 /// the connection is established, its data is empty string. 102 /// the connection is established, its data is empty string.
103 Var GetProtocol(); 103 Var GetProtocol();
104 104
105 /// GetReadyState() returns the ready state of the specified WebSocket 105 /// GetReadyState() returns the ready state of the specified WebSocket
106 /// connection. 106 /// connection.
107 /// 107 ///
108 /// @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called 108 /// @return Returns <code>PP_WEBSOCKETREADYSTATE_INVALID_DEV</code> if called
109 /// before the connection is established. 109 /// before connect() is called.
110 PP_WebSocketReadyState_Dev GetReadyState(); 110 PP_WebSocketReadyState_Dev GetReadyState();
111 111
112 /// GetURL() returns the URL associated with specified WebSocket connection. 112 /// GetURL() returns the URL associated with specified WebSocket connection.
113 /// 113 ///
114 /// @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before 114 /// @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before
115 /// the connection is established, its data is empty string. 115 /// the connection is established, its data is empty string.
116 Var GetURL(); 116 Var GetURL();
117 117
118 /// OnOpen() is invoked when the connection is established by Connect(). 118 /// OnOpen() is invoked when the connection is established by Connect().
119 virtual void OnOpen() = 0; 119 virtual void OnOpen() = 0;
120 120
121 /// OnMessage() is invoked when a message is received. 121 /// OnMessage() is invoked when a message is received.
122 virtual void OnMessage(Var message) = 0; 122 virtual void OnMessage(Var message) = 0;
123 123
124 /// OnError() is invoked if the user agent was required to fail the WebSocket 124 /// OnError() is invoked if the user agent was required to fail the WebSocket
125 /// connection or the WebSocket connection is closed with prejudice. 125 /// connection or the WebSocket connection is closed with prejudice.
126 /// OnClose() always follows OnError(). 126 /// OnClose() always follows OnError().
127 virtual void OnError() = 0; 127 virtual void OnError() = 0;
128 128
129 /// OnClose() is invoked when the connection is closed by errors or Close(). 129 /// OnClose() is invoked when the connection is closed by errors or Close().
130 virtual void OnClose(bool wasClean, uint16_t code, const Var& reason) = 0; 130 virtual void OnClose(bool wasClean, uint16_t code, const Var& reason) = 0;
131 }; 131 };
132 132
133 } // namespace pp 133 } // namespace pp
134 134
135 #endif // PPAPI_CPP_DEV_WEBSOCKET_DEV_H_ 135 #endif // PPAPI_CPP_DEV_WEBSOCKET_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_websocket_dev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698