summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/renderer_host/websocket_dispatcher_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/renderer_host/websocket_dispatcher_host.h')
-rw-r--r--chromium/content/browser/renderer_host/websocket_dispatcher_host.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/chromium/content/browser/renderer_host/websocket_dispatcher_host.h b/chromium/content/browser/renderer_host/websocket_dispatcher_host.h
index 638178ee9b3..4179b71b2e2 100644
--- a/chromium/content/browser/renderer_host/websocket_dispatcher_host.h
+++ b/chromium/content/browser/renderer_host/websocket_dispatcher_host.h
@@ -45,18 +45,18 @@ class CONTENT_EXPORT WebSocketDispatcherHost : public BrowserMessageFilter {
WEBSOCKET_HOST_DELETED
};
- explicit WebSocketDispatcherHost(
+ WebSocketDispatcherHost(
+ int process_id,
const GetRequestContextCallback& get_context_callback);
// For testing. Specify a factory method that creates mock version of
// WebSocketHost.
- WebSocketDispatcherHost(
- const GetRequestContextCallback& get_context_callback,
- const WebSocketHostFactory& websocket_host_factory);
+ WebSocketDispatcherHost(int process_id,
+ const GetRequestContextCallback& get_context_callback,
+ const WebSocketHostFactory& websocket_host_factory);
// BrowserMessageFilter:
- virtual bool OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// The following methods are used by WebSocketHost::EventInterface to send
// IPCs from the browser to the renderer or child process. Any of them may
@@ -81,26 +81,38 @@ class CONTENT_EXPORT WebSocketDispatcherHost : public BrowserMessageFilter {
WebSocketHostState SendFlowControl(int routing_id,
int64 quota) WARN_UNUSED_RESULT;
- // Sends a WebSocketMsg_SendClosing IPC
- WebSocketHostState SendClosing(int routing_id) WARN_UNUSED_RESULT;
+ // Sends a WebSocketMsg_NotifyClosing IPC
+ WebSocketHostState NotifyClosingHandshake(int routing_id) WARN_UNUSED_RESULT;
// Sends a WebSocketMsg_NotifyStartOpeningHandshake IPC.
- WebSocketHostState SendStartOpeningHandshake(
+ WebSocketHostState NotifyStartOpeningHandshake(
int routing_id,
const WebSocketHandshakeRequest& request) WARN_UNUSED_RESULT;
// Sends a WebSocketMsg_NotifyFinishOpeningHandshake IPC.
- WebSocketHostState SendFinishOpeningHandshake(
+ WebSocketHostState NotifyFinishOpeningHandshake(
int routing_id,
const WebSocketHandshakeResponse& response) WARN_UNUSED_RESULT;
+ // Sends a WebSocketMsg_NotifyFailure IPC and deletes and unregisters the
+ // channel.
+ WebSocketHostState NotifyFailure(
+ int routing_id,
+ const std::string& message) WARN_UNUSED_RESULT;
+
// Sends a WebSocketMsg_DropChannel IPC and deletes and unregisters the
// channel.
WebSocketHostState DoDropChannel(
int routing_id,
+ bool was_clean,
uint16 code,
const std::string& reason) WARN_UNUSED_RESULT;
+ // Returns whether the associated renderer process can read raw cookies.
+ bool CanReadRawCookies() const;
+
+ int render_process_id() const { return process_id_; }
+
private:
typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable;
@@ -126,6 +138,9 @@ class CONTENT_EXPORT WebSocketDispatcherHost : public BrowserMessageFilter {
// routing_id.
WebSocketHostTable hosts_;
+ // The the process ID of the associated renderer process.
+ const int process_id_;
+
// A callback which returns the appropriate net::URLRequestContext for us to
// use.
GetRequestContextCallback get_context_callback_;