| 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 |
| 11 // removed. | 11 // removed. |
| 12 // | 12 // |
| 13 // This IPC interface is based on the WebSocket multiplexing draft spec, | 13 // This IPC interface is based on the WebSocket multiplexing draft spec, |
| 14 // http://tools.ietf.org/html/draft-ietf-hybi-websocket-multiplexing-09 | 14 // http://tools.ietf.org/html/draft-ietf-hybi-websocket-multiplexing-09 |
| 15 | 15 |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
| 20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 21 #include "content/common/websocket.h" | 21 #include "content/common/websocket.h" |
| 22 #include "googleurl/src/gurl.h" | |
| 23 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.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 // WebSocket messages sent from the renderer to the browser. | 29 // WebSocket messages sent from the renderer to the browser. |
| 30 | 30 |
| 31 // Open new virtual WebSocket connection to |socket_url|. |channel_id| is an | 31 // Open new virtual WebSocket connection to |socket_url|. |channel_id| is an |
| 32 // identifier chosen by the renderer for the new channel. It cannot correspond | 32 // identifier chosen by the renderer for the new channel. It cannot correspond |
| 33 // to an existing open channel, and must be between 1 and | 33 // to an existing open channel, and must be between 1 and |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // |channel_id| available for reuse by a new AddChannelRequest. | 101 // |channel_id| available for reuse by a new AddChannelRequest. |
| 102 // |code| is one of the reason codes specified in RFC6455 or | 102 // |code| is one of the reason codes specified in RFC6455 or |
| 103 // draft-ietf-hybi-websocket-multiplexing-09. |reason|, if non-empty, is a | 103 // draft-ietf-hybi-websocket-multiplexing-09. |reason|, if non-empty, is a |
| 104 // UTF-8 encoded string which may be useful for debugging but is not necessarily | 104 // UTF-8 encoded string which may be useful for debugging but is not necessarily |
| 105 // human-readable, as supplied by the server in the Close or DropChannel | 105 // human-readable, as supplied by the server in the Close or DropChannel |
| 106 // message. | 106 // message. |
| 107 IPC_MESSAGE_CONTROL3(WebSocketMsg_DropChannel, | 107 IPC_MESSAGE_CONTROL3(WebSocketMsg_DropChannel, |
| 108 int /* channel_id */, | 108 int /* channel_id */, |
| 109 unsigned short /* code */, | 109 unsigned short /* code */, |
| 110 std::string /* reason */) | 110 std::string /* reason */) |
| OLD | NEW |