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

Side by Side Diff: content/common/websocket_messages.h

Issue 2003253002: [Devtools] Allow User-Agent header override for Websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « content/child/websocket_bridge.cc ('k') | net/websockets/websocket_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. 8 // WebSockets.
9 // 9 //
10 // This IPC interface was originally desined based on the WebSocket 10 // This IPC interface was originally desined based on the WebSocket
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 IPC_STRUCT_TRAITS_MEMBER(headers) 60 IPC_STRUCT_TRAITS_MEMBER(headers)
61 IPC_STRUCT_TRAITS_MEMBER(headers_text) 61 IPC_STRUCT_TRAITS_MEMBER(headers_text)
62 IPC_STRUCT_TRAITS_MEMBER(response_time) 62 IPC_STRUCT_TRAITS_MEMBER(response_time)
63 IPC_STRUCT_TRAITS_END() 63 IPC_STRUCT_TRAITS_END()
64 64
65 // WebSocket messages sent from the renderer to the browser. 65 // WebSocket messages sent from the renderer to the browser.
66 66
67 // Open new WebSocket connection to |socket_url|. |requested_protocols| is a 67 // Open new WebSocket connection to |socket_url|. |requested_protocols| is a
68 // list of tokens identifying sub-protocols the renderer would like to use, as 68 // list of tokens identifying sub-protocols the renderer would like to use, as
69 // described in RFC6455 "Subprotocols Using the WebSocket Protocol". 69 // described in RFC6455 "Subprotocols Using the WebSocket Protocol".
70 IPC_MESSAGE_ROUTED4(WebSocketHostMsg_AddChannelRequest, 70 IPC_MESSAGE_ROUTED5(WebSocketHostMsg_AddChannelRequest,
71 GURL /* socket_url */, 71 GURL /* socket_url */,
72 std::vector<std::string> /* requested_protocols */, 72 std::vector<std::string> /* requested_protocols */,
73 url::Origin /* origin */, 73 url::Origin /* origin */,
pfeldman 2016/06/08 00:11:39 @tsepez, @creis: should we rename this origin into
74 std::string /* additional_headers */,
Tom Sepez 2016/06/03 18:08:40 Seems like a bad idea to let the renderer specific
allada 2016/06/03 23:48:57 Right now it's not exposed to any script interface
74 int /* render_frame_id */) 75 int /* render_frame_id */)
75 76
76 // Send a complete binary WebSocket message consisting of the Blob identified by 77 // Send a complete binary WebSocket message consisting of the Blob identified by
77 // |uuid|. The message will be split into frames as necessary. |expected_size| 78 // |uuid|. The message will be split into frames as necessary. |expected_size|
78 // must match the browser's idea of the size of the Blob to prevent flow control 79 // must match the browser's idea of the size of the Blob to prevent flow control
79 // from becoming desynchronised. If it does not match the connection will be 80 // from becoming desynchronised. If it does not match the connection will be
80 // terminated with a WebSocketMsg_NotifyFailure message. On success, the browser 81 // terminated with a WebSocketMsg_NotifyFailure message. On success, the browser
81 // will have consumed |expected_size| bytes of flow control send quota and the 82 // will have consumed |expected_size| bytes of flow control send quota and the
82 // renderer needs to subtract that from its running total of flow control send 83 // renderer needs to subtract that from its running total of flow control send
83 // quota. See the design doc at 84 // quota. See the design doc at
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // a closing handshake and the renderer cannot accept any new messages on this 187 // a closing handshake and the renderer cannot accept any new messages on this
187 // connection. 188 // connection.
188 IPC_MESSAGE_ROUTED3(WebSocketMsg_DropChannel, 189 IPC_MESSAGE_ROUTED3(WebSocketMsg_DropChannel,
189 bool /* was_clean */, 190 bool /* was_clean */,
190 unsigned short /* code */, 191 unsigned short /* code */,
191 std::string /* reason */) 192 std::string /* reason */)
192 193
193 // Notify the renderer that a closing handshake has been initiated by the 194 // Notify the renderer that a closing handshake has been initiated by the
194 // server, so that it can set the Javascript readyState to CLOSING. 195 // server, so that it can set the Javascript readyState to CLOSING.
195 IPC_MESSAGE_ROUTED0(WebSocketMsg_NotifyClosing) 196 IPC_MESSAGE_ROUTED0(WebSocketMsg_NotifyClosing)
OLDNEW
« no previous file with comments | « content/child/websocket_bridge.cc ('k') | net/websockets/websocket_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698