Chromium Code Reviews| Index: ppapi/proxy/ppapi_messages.h |
| diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h |
| index 46be53ddb48989f44acf820e4586b2a293dcf107..28a61aa20f2bd4325693cb5a9f5ec8dc4d3162f7 100644 |
| --- a/ppapi/proxy/ppapi_messages.h |
| +++ b/ppapi/proxy/ppapi_messages.h |
| @@ -1582,3 +1582,84 @@ IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) |
| IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) |
| IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, |
| PP_PrintSettings_Dev /* print_settings */) |
| + |
| +// WebSocket ------------------------------------------------------------------ |
| + |
| +IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) |
| + |
| +// Establishes the connection to a server. This message requires |
| +// WebSocket_ConnectReply as a reply message. |
| +IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, |
| + std::string /* url */, |
| + std::vector<std::string> /* protocols */) |
| + |
| +// Closes established connection with graceful closing handshake. This message |
| +// requires WebSocket_CloseReply as a reply message. |
| +IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close, |
| + int32_t /* code */, |
| + std::string /* reason */) |
| + |
| +// Sends a text frame to the server. No reply is defined. |
| +IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText, |
| + std::string /* message */) |
| + |
| +// Sends a binary frame to the server. No reply is defined. |
| +IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary, |
| + std::vector<uint8_t> /* message */) |
| + |
| +// Fails the connection. This message invokes RFC6455 defined |
| +// _Fail the WebSocket Connection_ operation. No reply is defined. |
| +IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail, |
| + std::string /* message */) |
| + |
| +// This message is a reply to WebSocket_Connect. If the |url| and |protocols| |
| +// are invalid, WebSocket_ConnectReply is issued immediately and it contains |
| +// proper error code in its result. Otherwise, WebSocket_ConnectReply is sent |
| +// with result PP_OK_COMPLETIONPENDING and valid |url| field. In this case, |
| +// another WebSocket_ConnectReply might be issued later with result PP_OK and |
| +// valid |protocol| field as a result of protocol negotiation. If the |
| +// connection can not be established successfully, no more |
| +// WebSocket_ConnectReply is issued, and WebSocket_ClosedReply is sent instead. |
| +IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply, |
| + std::string /* url */, |
| + std::string /* protocol */) |
| + |
| +// This message is a reply to WebSocket_Close. If the operation fails, |
| +// WebSocket_CloseReply is issued immediately and it contains PP_ERROR_FAILED. |
| +// Otherwise, CloseReply will be issued after the closing handshake is |
| +// finished. All arguments will be valid iff the result is PP_OK and it means |
| +// that the client initiated closing handshake is finished gracefully. |
| +IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply, |
| + unsigned long /* buffered_amount */, |
| + bool /* was_clean */, |
| + unsigned short /* code */, |
| + std::string /* reason */) |
| + |
| +// Unsolicited reply message to transmit a receiving text frame. |
| +IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply, |
| + std::string /* message */) |
| + |
| +// Unsolicited reply message to transmit a receiving binary frame. |
| +IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply, |
| + std::vector<uint8_t> /* message */) |
| + |
| +// Unsolicited reply message to notify a error on underlying network connetion. |
| +IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply) |
| + |
| +// Unsolicited reply message to update the buffered amount value. |
| +IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply, |
| + unsigned long /* buffered_amount */) |
| + |
| +// Unsolicited reply message to update |state| because of incoming external |
| +// events, e.g., protocol error, or unexpected network closure. |
| +IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply, |
| + int32_t /* state */) |
| + |
| +// Unsolicited reply message to notify that the connection is closed without |
| +// any WebSocket_Close request. Server initiated closing handshake or |
| +// unexpected network errors will invoke this message. |
|
brettw
2012/10/03 20:30:24
Thanks, this is much clearer to me now.
|
| +IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply, |
| + unsigned long /* buffered_amount */, |
| + bool /* was_clean */, |
| + unsigned short /* code */, |
| + std::string /* reason */) |