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

Side by Side Diff: ppapi/proxy/ppapi_messages.h

Issue 10944005: Pepper WebSocket API: Implement new design Chrome IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (not for review: fix win build) Created 8 years, 2 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 // Multiply-included message header, no traditional include guard. 5 // Multiply-included message header, no traditional include guard.
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 1575
1576 // Reply to a RequestMemory call. This supplies the shared memory handle. The 1576 // Reply to a RequestMemory call. This supplies the shared memory handle. The
1577 // actual handle is passed in the ReplyParams struct. 1577 // actual handle is passed in the ReplyParams struct.
1578 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory) 1578 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory)
1579 1579
1580 // Printing. 1580 // Printing.
1581 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) 1581 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create)
1582 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings) 1582 IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings)
1583 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, 1583 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply,
1584 PP_PrintSettings_Dev /* print_settings */) 1584 PP_PrintSettings_Dev /* print_settings */)
1585
1586 // WebSocket ------------------------------------------------------------------
1587
1588 IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create)
1589
1590 // Establishes the connection to a server. This message requires
1591 // WebSocket_ConnectReply as a reply message.
1592 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect,
1593 std::string /* url */,
1594 std::vector<std::string> /* protocols */)
1595
1596 // Closes established connection with graceful closing handshake. This message
1597 // requires WebSocket_CloseReply as a reply message.
1598 IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close,
1599 int32_t /* code */,
1600 std::string /* reason */)
1601
1602 // Sends a text frame to the server. No reply is defined.
1603 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText,
1604 std::string /* message */)
1605
1606 // Sends a binary frame to the server. No reply is defined.
1607 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary,
1608 std::vector<uint8_t> /* message */)
1609
1610 // Fails the connection. This message invokes RFC6455 defined
1611 // _Fail the WebSocket Connection_ operation. No reply is defined.
1612 IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail,
1613 std::string /* message */)
1614
1615 // This message is a reply to WebSocket_Connect. If the |url| and |protocols|
1616 // are invalid, WebSocket_ConnectReply is issued immediately and it contains
1617 // proper error code in its result. Otherwise, WebSocket_ConnectReply is sent
1618 // with result PP_OK_COMPLETIONPENDING and valid |url| field. In this case,
1619 // another WebSocket_ConnectReply might be issued later with result PP_OK and
1620 // valid |protocol| field as a result of protocol negotiation. If the
1621 // connection can not be established successfully, no more
1622 // WebSocket_ConnectReply is issued, and WebSocket_ClosedReply is sent instead.
1623 IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply,
1624 std::string /* url */,
1625 std::string /* protocol */)
1626
1627 // This message is a reply to WebSocket_Close. If the operation fails,
1628 // WebSocket_CloseReply is issued immediately and it contains PP_ERROR_FAILED.
1629 // Otherwise, CloseReply will be issued after the closing handshake is
1630 // finished. All arguments will be valid iff the result is PP_OK and it means
1631 // that the client initiated closing handshake is finished gracefully.
1632 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply,
1633 unsigned long /* buffered_amount */,
1634 bool /* was_clean */,
1635 unsigned short /* code */,
1636 std::string /* reason */)
1637
1638 // Unsolicited reply message to transmit a receiving text frame.
1639 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply,
1640 std::string /* message */)
1641
1642 // Unsolicited reply message to transmit a receiving binary frame.
1643 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply,
1644 std::vector<uint8_t> /* message */)
1645
1646 // Unsolicited reply message to notify a error on underlying network connetion.
1647 IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply)
1648
1649 // Unsolicited reply message to update the buffered amount value.
1650 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply,
1651 unsigned long /* buffered_amount */)
1652
1653 // Unsolicited reply message to update |state| because of incoming external
1654 // events, e.g., protocol error, or unexpected network closure.
1655 IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply,
1656 int32_t /* state */)
1657
1658 // Unsolicited reply message to notify that the connection is closed without
1659 // any WebSocket_Close request. Server initiated closing handshake or
1660 // unexpected network errors will invoke this message.
brettw 2012/10/03 20:30:24 Thanks, this is much clearer to me now.
1661 IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply,
1662 unsigned long /* buffered_amount */,
1663 bool /* was_clean */,
1664 unsigned short /* code */,
1665 std::string /* reason */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698