summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages_internal.h
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 11:02:30 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 11:02:30 +0000
commit7651263c029f3f0716d30001a5f8fd9c29bcd098 (patch)
treef3f7bb2ea0227e144a827ecde5315e9ae797f1a9 /chrome/common/render_messages_internal.h
parentc29d7714d02072f9fcff7c9220ba04103d4a5043 (diff)
downloadchromium_src-7651263c029f3f0716d30001a5f8fd9c29bcd098.zip
chromium_src-7651263c029f3f0716d30001a5f8fd9c29bcd098.tar.gz
chromium_src-7651263c029f3f0716d30001a5f8fd9c29bcd098.tar.bz2
Web Socket support: Chromium IPC
Add IPC messages used in SocketStreamHandle for Web Sockets. BUG=12497 TEST=none Review URL: http://codereview.chromium.org/188007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_internal.h')
-rw-r--r--chrome/common/render_messages_internal.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index e5993a6..5884888 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -797,6 +797,33 @@ IPC_BEGIN_MESSAGES(View)
IPC_MESSAGE_CONTROL1(UtilityMsg_ParseUpdateManifest,
std::string /* xml document contents */)
+ // Socket Stream messages:
+ // These are messages from the browser to the SocketStreamHandle on
+ // a renderer.
+
+ // A |socket_id| is assigned by ViewHostMsg_SocketStream_Connect.
+ // The Socket Stream is connected. The SocketStreamHandle should keep track
+ // of how much it has pending (how much it has requested to be sent) and
+ // shouldn't go over |max_pending_send_allowed| bytes.
+ IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_Connected,
+ int /* socket_id */,
+ int /* max_pending_send_allowed */)
+
+ // |data| is received on the Socket Stream.
+ IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_ReceivedData,
+ int /* socket_id */,
+ std::vector<char> /* data */)
+
+ // |amount_sent| bytes of data requested by
+ // ViewHostMsg_SocketStream_SendData has been sent on the Socket Stream.
+ IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_SentData,
+ int /* socket_id */,
+ int /* amount_sent */)
+
+ // The Socket Stream is closed.
+ IPC_MESSAGE_CONTROL1(ViewMsg_SocketStream_Closed,
+ int /* socket_id */)
+
IPC_END_MESSAGES(View)
@@ -1857,4 +1884,37 @@ IPC_BEGIN_MESSAGES(ViewHost)
FilePath /* the name of the file */,
int32 /* a unique message ID */)
+ //---------------------------------------------------------------------------
+ // Socket Stream messages:
+ // These are messages from the SocketStreamHandle to the browser.
+
+ // Open new Socket Stream for the |socket_url| identified by |socket_id|
+ // in the renderer process.
+ // The browser starts connecting asynchronously.
+ // Once Socket Stream connection is established, the browser will send
+ // ViewMsg_SocketStream_Connected back.
+ IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_Connect,
+ GURL /* socket_url */,
+ int /* socket_id */)
+
+ // Request to send data on the Socket Stream.
+ // SocketStreamHandle can send data at most |max_pending_send_allowed| bytes,
+ // which is given by ViewMsg_SocketStream_Connected at any time.
+ // The number of pending bytes can be tracked by size of |data| sent
+ // and |amount_sent| parameter of ViewMsg_SocketStream_DataSent.
+ // That is, the following constraints is applied:
+ // (accumulated total of |data|) - (accumulated total of |amount_sent|)
+ // <= |max_pending_send_allowed|
+ // If the SocketStreamHandle ever tries to exceed the
+ // |max_pending_send_allowed|, the connection will be closed.
+ IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_SendData,
+ int /* socket_id */,
+ std::vector<char> /* data */)
+
+ // Request to close the Socket Stream.
+ // The browser will send ViewMsg_SocketStream_Closed back when the Socket
+ // Stream is completely closed.
+ IPC_MESSAGE_CONTROL1(ViewHostMsg_SocketStream_Close,
+ int /* socket_id */)
+
IPC_END_MESSAGES(ViewHost)