diff options
author | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 02:12:56 +0000 |
---|---|---|
committer | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 02:12:56 +0000 |
commit | 3572daea423c006950ba12340d7961a7a1768875 (patch) | |
tree | 7ed4ce81452f5f72fd607a717e9077ca19df023b /content/common/websocket.h | |
parent | 60531d54b668c625ea5e2e7d4285ae8ac7388691 (diff) | |
download | chromium_src-3572daea423c006950ba12340d7961a7a1768875.zip chromium_src-3572daea423c006950ba12340d7961a7a1768875.tar.gz chromium_src-3572daea423c006950ba12340d7961a7a1768875.tar.bz2 |
Notify WebSocket handshake information to the renderer, chromium side
Notify WebSocket opening handshake request / response to the renderer process
to show them in the inspector.
Moved WebSocketHandshake{Request, Response} from modules/websockets
to platform/network to use them in platform/exported .
Blink side CL is: https://codereview.chromium.org/77273002/
BUG=310405
R=ricea, tsepez, jam
Review URL: https://codereview.chromium.org/77513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/websocket.h')
-rw-r--r-- | content/common/websocket.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/content/common/websocket.h b/content/common/websocket.h index 3bc8a99..98d75fa 100644 --- a/content/common/websocket.h +++ b/content/common/websocket.h @@ -5,6 +5,13 @@ #ifndef CONTENT_COMMON_WEBSOCKET_H_ #define CONTENT_COMMON_WEBSOCKET_H_ +#include <string> +#include <utility> +#include <vector> + +#include "base/time/time.h" +#include "url/gurl.h" + namespace content { // WebSocket data message types sent between the browser and renderer processes. @@ -14,6 +21,38 @@ enum WebSocketMessageType { WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2 }; +// Opening handshake request information which will be shown in the inspector. +// All string data should be encoded to ASCII in the browser process. +struct WebSocketHandshakeRequest { + WebSocketHandshakeRequest(); + ~WebSocketHandshakeRequest(); + + // The request URL + GURL url; + // Additional HTTP request headers + std::vector<std::pair<std::string, std::string> > headers; + // The time that this request is sent + base::Time request_time; +}; + +// Opening handshake response information which will be shown in the inspector. +// All string data should be encoded to ASCII in the browser process. +struct WebSocketHandshakeResponse { + WebSocketHandshakeResponse(); + ~WebSocketHandshakeResponse(); + + // The request URL + GURL url; + // HTTP status code + int status_code; + // HTTP status text + std::string status_text; + // Additional HTTP response headers + std::vector<std::pair<std::string, std::string> > headers; + // The time that this response arrives + base::Time response_time; +}; + } // namespace content #endif // CONTENT_COMMON_WEBSOCKET_H_ |