| 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 #ifndef CONTENT_COMMON_WEBSOCKET_H_ | 5 #ifndef CONTENT_COMMON_WEBSOCKET_H_ |
| 6 #define CONTENT_COMMON_WEBSOCKET_H_ | 6 #define CONTENT_COMMON_WEBSOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // WebSocket data message types sent between the browser and renderer processes. | 17 // WebSocket data message types sent between the browser and renderer processes. |
| 18 enum WebSocketMessageType { | 18 enum WebSocketMessageType { |
| 19 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0, | 19 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0, |
| 20 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1, | 20 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1, |
| 21 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2 | 21 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2, |
| 22 WEB_SOCKET_MESSAGE_TYPE_LAST = WEB_SOCKET_MESSAGE_TYPE_BINARY |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 // Opening handshake request information which will be shown in the inspector. | 25 // Opening handshake request information which will be shown in the inspector. |
| 25 // All string data should be encoded to ASCII in the browser process. | 26 // All string data should be encoded to ASCII in the browser process. |
| 26 struct WebSocketHandshakeRequest { | 27 struct WebSocketHandshakeRequest { |
| 27 WebSocketHandshakeRequest(); | 28 WebSocketHandshakeRequest(); |
| 28 ~WebSocketHandshakeRequest(); | 29 ~WebSocketHandshakeRequest(); |
| 29 | 30 |
| 30 // The request URL | 31 // The request URL |
| 31 GURL url; | 32 GURL url; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 49 std::string status_text; | 50 std::string status_text; |
| 50 // Additional HTTP response headers | 51 // Additional HTTP response headers |
| 51 std::vector<std::pair<std::string, std::string> > headers; | 52 std::vector<std::pair<std::string, std::string> > headers; |
| 52 // The time that this response arrives | 53 // The time that this response arrives |
| 53 base::Time response_time; | 54 base::Time response_time; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace content | 57 } // namespace content |
| 57 | 58 |
| 58 #endif // CONTENT_COMMON_WEBSOCKET_H_ | 59 #endif // CONTENT_COMMON_WEBSOCKET_H_ |
| OLD | NEW |