OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
6 | 6 |
7 // This file defines the IPCs for the browser-side implementation of | 7 // This file defines the IPCs for the browser-side implementation of |
8 // WebSockets. For the legacy renderer-side implementation, see | 8 // WebSockets. For the legacy renderer-side implementation, see |
9 // socket_stream_messages.h. | 9 // socket_stream_messages.h. |
10 // TODO(ricea): Fix this comment when the legacy implementation has been | 10 // TODO(ricea): Fix this comment when the legacy implementation has been |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 #undef IPC_MESSAGE_EXPORT | 25 #undef IPC_MESSAGE_EXPORT |
26 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 26 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
27 #define IPC_MESSAGE_START WebSocketMsgStart | 27 #define IPC_MESSAGE_START WebSocketMsgStart |
28 | 28 |
29 IPC_STRUCT_TRAITS_BEGIN(content::WebSocketHandshakeRequest) | 29 IPC_STRUCT_TRAITS_BEGIN(content::WebSocketHandshakeRequest) |
30 IPC_STRUCT_TRAITS_MEMBER(url) | 30 IPC_STRUCT_TRAITS_MEMBER(url) |
31 IPC_STRUCT_TRAITS_MEMBER(headers) | 31 IPC_STRUCT_TRAITS_MEMBER(headers) |
| 32 IPC_STRUCT_TRAITS_MEMBER(headers_text) |
32 IPC_STRUCT_TRAITS_MEMBER(request_time) | 33 IPC_STRUCT_TRAITS_MEMBER(request_time) |
33 IPC_STRUCT_TRAITS_END() | 34 IPC_STRUCT_TRAITS_END() |
34 | 35 |
35 IPC_STRUCT_TRAITS_BEGIN(content::WebSocketHandshakeResponse) | 36 IPC_STRUCT_TRAITS_BEGIN(content::WebSocketHandshakeResponse) |
36 IPC_STRUCT_TRAITS_MEMBER(url) | 37 IPC_STRUCT_TRAITS_MEMBER(url) |
37 IPC_STRUCT_TRAITS_MEMBER(status_code) | 38 IPC_STRUCT_TRAITS_MEMBER(status_code) |
38 IPC_STRUCT_TRAITS_MEMBER(status_text) | 39 IPC_STRUCT_TRAITS_MEMBER(status_text) |
39 IPC_STRUCT_TRAITS_MEMBER(headers) | 40 IPC_STRUCT_TRAITS_MEMBER(headers) |
| 41 IPC_STRUCT_TRAITS_MEMBER(headers_text) |
40 IPC_STRUCT_TRAITS_MEMBER(response_time) | 42 IPC_STRUCT_TRAITS_MEMBER(response_time) |
41 IPC_STRUCT_TRAITS_END() | 43 IPC_STRUCT_TRAITS_END() |
42 | 44 |
43 // WebSocket messages sent from the renderer to the browser. | 45 // WebSocket messages sent from the renderer to the browser. |
44 | 46 |
45 // Open new virtual WebSocket connection to |socket_url|. |channel_id| is an | 47 // Open new virtual WebSocket connection to |socket_url|. |channel_id| is an |
46 // identifier chosen by the renderer for the new channel. It cannot correspond | 48 // identifier chosen by the renderer for the new channel. It cannot correspond |
47 // to an existing open channel, and must be between 1 and | 49 // to an existing open channel, and must be between 1 and |
48 // 0x7FFFFFFF. |requested_protocols| is a list of tokens identifying | 50 // 0x7FFFFFFF. |requested_protocols| is a list of tokens identifying |
49 // sub-protocols the renderer would like to use, as described in RFC6455 | 51 // sub-protocols the renderer would like to use, as described in RFC6455 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // message. | 144 // message. |
143 // If |was_clean| is false on a message from the browser, then the WebSocket | 145 // If |was_clean| is false on a message from the browser, then the WebSocket |
144 // connection was not closed cleanly. If |was_clean| is false on a message from | 146 // connection was not closed cleanly. If |was_clean| is false on a message from |
145 // the renderer, then the connection should be closed immediately without a | 147 // the renderer, then the connection should be closed immediately without a |
146 // closing handshake and the renderer cannot accept any new messages on this | 148 // closing handshake and the renderer cannot accept any new messages on this |
147 // connection. | 149 // connection. |
148 IPC_MESSAGE_ROUTED3(WebSocketMsg_DropChannel, | 150 IPC_MESSAGE_ROUTED3(WebSocketMsg_DropChannel, |
149 bool /* was_clean */, | 151 bool /* was_clean */, |
150 unsigned short /* code */, | 152 unsigned short /* code */, |
151 std::string /* reason */) | 153 std::string /* reason */) |
OLD | NEW |