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

Unified Diff: content/common/websocket_messages.h

Issue 34753008: Notify WebSocket connection failure, chromium side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« content/child/websocket_bridge.cc ('K') | « content/child/websocket_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/websocket_messages.h
diff --git a/content/common/websocket_messages.h b/content/common/websocket_messages.h
index 5a9304f8a700888fcfc2b5c7b72fdf566ac5341e..e10ebdf0824f0c459e4368afcfd524c87289244a 100644
--- a/content/common/websocket_messages.h
+++ b/content/common/websocket_messages.h
@@ -43,7 +43,7 @@ IPC_MESSAGE_ROUTED3(WebSocketHostMsg_AddChannelRequest,
std::vector<std::string> /* requested_protocols */,
GURL /* origin */)
-// Web Socket messages sent from the browser to the renderer.
+// WebSocket messages sent from the browser to the renderer.
// Respond to an AddChannelRequest for channel |channel_id|. |channel_id| is
// scoped to the renderer process; while it is unique per-renderer, the browser
@@ -59,6 +59,17 @@ IPC_MESSAGE_ROUTED3(WebSocketMsg_AddChannelResponse,
std::string /* selected_protocol */,
std::string /* extensions */)
+// Notify the renderer that the browser is required to fail the connection.
+// This message will be followed by a corresponding DropChannel message and
+// hence the renderer should NOT drop the channel when it receives this
+// message.
+// |message| will be shown in the inspector and won't be passed to the
+// script.
+// TODO(yhirano): Find the way to pass |message| directly to the inspector
+// process.
+IPC_MESSAGE_ROUTED1(WebSocketMsg_NotifyFailure,
+ std::string /* message */)
+
// WebSocket messages that can be sent in either direction.
IPC_ENUM_TRAITS(content::WebSocketMessageType)
@@ -100,6 +111,12 @@ IPC_MESSAGE_ROUTED1(WebSocketMsg_FlowControl,
// UTF-8 encoded string which may be useful for debugging but is not necessarily
// human-readable, as supplied by the server in the Close or DropChannel
// message.
-IPC_MESSAGE_ROUTED2(WebSocketMsg_DropChannel,
+// If |was_clean| is false on a message from the browser, then the WebSocket
+// connection was not closed cleanly. If |was_clean| is false on a message from
+// the renderer, then the connection should be closed immediately without a
+// closing handshake and the renderer cannot accept any new messages about this
+// connection.
+IPC_MESSAGE_ROUTED3(WebSocketMsg_DropChannel,
+ bool /* was_clean */,
unsigned short /* code */,
std::string /* reason */)
« content/child/websocket_bridge.cc ('K') | « content/child/websocket_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698