[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / common / websocket.h
blob108131877724a180cf169aa9b5e0e517451098c6
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_WEBSOCKET_H_
6 #define CONTENT_COMMON_WEBSOCKET_H_
8 #include <string>
9 #include <utility>
10 #include <vector>
12 #include "base/time/time.h"
13 #include "url/gurl.h"
15 namespace content {
17 // WebSocket data message types sent between the browser and renderer processes.
18 enum WebSocketMessageType {
19 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0,
20 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1,
21 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2,
22 WEB_SOCKET_MESSAGE_TYPE_LAST = WEB_SOCKET_MESSAGE_TYPE_BINARY
25 // Opening handshake request information which will be shown in the inspector.
26 // All string data should be encoded to ASCII in the browser process.
27 struct WebSocketHandshakeRequest {
28 WebSocketHandshakeRequest();
29 ~WebSocketHandshakeRequest();
31 // The request URL
32 GURL url;
33 // Additional HTTP request headers
34 std::vector<std::pair<std::string, std::string> > headers;
35 // HTTP request headers raw string
36 std::string headers_text;
37 // The time that this request is sent
38 base::Time request_time;
41 // Opening handshake response information which will be shown in the inspector.
42 // All string data should be encoded to ASCII in the browser process.
43 struct WebSocketHandshakeResponse {
44 WebSocketHandshakeResponse();
45 ~WebSocketHandshakeResponse();
47 // The request URL
48 GURL url;
49 // HTTP status code
50 int status_code;
51 // HTTP status text
52 std::string status_text;
53 // Additional HTTP response headers
54 std::vector<std::pair<std::string, std::string> > headers;
55 // HTTP response headers raw string
56 std::string headers_text;
57 // The time that this response arrives
58 base::Time response_time;
61 } // namespace content
63 #endif // CONTENT_COMMON_WEBSOCKET_H_