chromeos: dbus: add Bluetooth properties support
[chromium-blink-merge.git] / content / common / socket_stream_messages.h
blob50d5ce8b5d1b144346d871681fed7b33fcef3ebc
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
3 // found in the LICENSE file.
5 // Multiply-included message file, hence no include guard.
6 #include <vector>
8 #include "googleurl/src/gurl.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "ipc/ipc_param_traits.h"
12 #define IPC_MESSAGE_START SocketStreamMsgStart
14 // Web Sockets messages sent from the renderer to the browser.
16 // Open new Socket Stream for the |socket_url| identified by |socket_id|
17 // in the renderer process.
18 // The browser starts connecting asynchronously.
19 // Once Socket Stream connection is established, the browser will send
20 // SocketStreamMsg_Connected back.
21 IPC_MESSAGE_CONTROL2(SocketStreamHostMsg_Connect,
22 GURL /* socket_url */,
23 int /* socket_id */)
25 // Request to send data on the Socket Stream.
26 // SocketStreamHandle can send data at most |max_pending_send_allowed| bytes,
27 // which is given by ViewMsg_SocketStream_Connected at any time.
28 // The number of pending bytes can be tracked by size of |data| sent
29 // and |amount_sent| parameter of ViewMsg_SocketStream_DataSent.
30 // That is, the following constraints is applied:
31 // (accumulated total of |data|) - (accumulated total of |amount_sent|)
32 // <= |max_pending_send_allowed|
33 // If the SocketStreamHandle ever tries to exceed the
34 // |max_pending_send_allowed|, the connection will be closed.
35 IPC_MESSAGE_CONTROL2(SocketStreamHostMsg_SendData,
36 int /* socket_id */,
37 std::vector<char> /* data */)
39 // Request to close the Socket Stream.
40 // The browser will send ViewMsg_SocketStream_Closed back when the Socket
41 // Stream is completely closed.
42 IPC_MESSAGE_CONTROL1(SocketStreamHostMsg_Close,
43 int /* socket_id */)
46 // Speech input messages sent from the browser to the renderer.
48 // A |socket_id| is assigned by SocketStreamHostMsg_Connect.
49 // The Socket Stream is connected. The SocketStreamHandle should keep track
50 // of how much it has pending (how much it has requested to be sent) and
51 // shouldn't go over |max_pending_send_allowed| bytes.
52 IPC_MESSAGE_CONTROL2(SocketStreamMsg_Connected,
53 int /* socket_id */,
54 int /* max_pending_send_allowed */)
56 // |data| is received on the Socket Stream.
57 IPC_MESSAGE_CONTROL2(SocketStreamMsg_ReceivedData,
58 int /* socket_id */,
59 std::vector<char> /* data */)
61 // |amount_sent| bytes of data requested by
62 // SocketStreamHostMsg_SendData has been sent on the Socket Stream.
63 IPC_MESSAGE_CONTROL2(SocketStreamMsg_SentData,
64 int /* socket_id */,
65 int /* amount_sent */)
67 // The Socket Stream is closed.
68 IPC_MESSAGE_CONTROL1(SocketStreamMsg_Closed,
69 int /* socket_id */)