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

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

Issue 1664743002: [OBSOLETE][DO NOT SUBMIT][DO NOT COMMIT]] Browser-side implementation of WebSocket Blob receive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@websocket_blob_send_sender
Patch Set: Now actually works. Created 4 years, 10 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/browser/renderer_host/websocket_host.cc ('k') | content/common/websocket_messages.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 #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 <stdint.h>
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace content { 17 namespace content {
17 18
18 // WebSocket data message types sent between the browser and renderer processes. 19 // WebSocket data message types sent between the browser and renderer processes.
19 enum WebSocketMessageType { 20 enum WebSocketMessageType {
20 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0, 21 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0,
21 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1, 22 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1,
22 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2, 23 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2,
23 WEB_SOCKET_MESSAGE_TYPE_LAST = WEB_SOCKET_MESSAGE_TYPE_BINARY 24 WEB_SOCKET_MESSAGE_TYPE_LAST = WEB_SOCKET_MESSAGE_TYPE_BINARY
24 }; 25 };
25 26
27 // WebSocket binary message types.
28 enum class WebSocketBinaryType : uint8_t {
29 BLOB = 0x0,
30 ARRAY_BUFFER = 0x1,
31 LAST = ARRAY_BUFFER
32 };
33
26 // Opening handshake request information which will be shown in the inspector. 34 // Opening handshake request information which will be shown in the inspector.
27 // All string data should be encoded to ASCII in the browser process. 35 // All string data should be encoded to ASCII in the browser process.
28 struct WebSocketHandshakeRequest { 36 struct WebSocketHandshakeRequest {
29 WebSocketHandshakeRequest(); 37 WebSocketHandshakeRequest();
30 ~WebSocketHandshakeRequest(); 38 ~WebSocketHandshakeRequest();
31 39
32 // The request URL 40 // The request URL
33 GURL url; 41 GURL url;
34 // Additional HTTP request headers 42 // Additional HTTP request headers
35 base::StringPairs headers; 43 base::StringPairs headers;
(...skipping 19 matching lines...) Expand all
55 base::StringPairs headers; 63 base::StringPairs headers;
56 // HTTP response headers raw string 64 // HTTP response headers raw string
57 std::string headers_text; 65 std::string headers_text;
58 // The time that this response arrives 66 // The time that this response arrives
59 base::Time response_time; 67 base::Time response_time;
60 }; 68 };
61 69
62 } // namespace content 70 } // namespace content
63 71
64 #endif // CONTENT_COMMON_WEBSOCKET_H_ 72 #endif // CONTENT_COMMON_WEBSOCKET_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/websocket_host.cc ('k') | content/common/websocket_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698