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

Unified Diff: content/browser/renderer_host/websocket_host.h

Issue 390773002: [WebSocket] Send a close frame when the renderer process is gone. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: content/browser/renderer_host/websocket_host.h
diff --git a/content/browser/renderer_host/websocket_host.h b/content/browser/renderer_host/websocket_host.h
index 21c77dcbbd558fe56d77ca147f3e60f208875779..39c1e41edbed3d56985f1bba437898bfae234c80 100644
--- a/content/browser/renderer_host/websocket_host.h
+++ b/content/browser/renderer_host/websocket_host.h
@@ -40,10 +40,16 @@ class CONTENT_EXPORT WebSocketHost {
net::URLRequestContext* url_request_context);
virtual ~WebSocketHost();
+ // The renderer process is going away.
+ // This function is virtual for testing.
+ virtual void GoAway();
+
// General message dispatch. WebSocketDispatcherHost::OnMessageReceived
// delegates to this method after looking up the |routing_id|.
virtual bool OnMessageReceived(const IPC::Message& message);
+ int routing_id() const { return routing_id_; }
+
private:
// Handlers for each message type, dispatched by OnMessageReceived(), as
// defined in content/common/websocket_messages.h

Powered by Google App Engine
This is Rietveld 408576698