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

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

Issue 1568523002: Implement content::WebSocketBlobSender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@websocket_blob_send_ipcs
Patch Set: Rebase. Created 4 years, 10 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 efdc9d1bd000ef1e56abd46f2808fb62724092ad..e95f65c31f4828a33e6e5dd927c74c50e87b2a5c 100644
--- a/content/browser/renderer_host/websocket_host.h
+++ b/content/browser/renderer_host/websocket_host.h
@@ -34,6 +34,7 @@ class Message;
namespace content {
+class WebSocketBlobSender;
class WebSocketDispatcherHost;
// Host of net::WebSocketChannel. The lifetime of an instance of this class is
@@ -60,6 +61,8 @@ class CONTENT_EXPORT WebSocketHost {
void OnHandshakeSucceeded() { handshake_succeeded_ = true; }
private:
+ class WebSocketEventHandler;
+
// Handlers for each message type, dispatched by OnMessageReceived(), as
// defined in content/common/websocket_messages.h
@@ -73,6 +76,8 @@ class CONTENT_EXPORT WebSocketHost {
const url::Origin& origin,
int render_frame_id);
+ void OnSendBlob(const std::string& uuid, uint64_t expected_size);
+
void OnSendFrame(bool fin,
WebSocketMessageType type,
const std::vector<char>& data);
@@ -81,6 +86,11 @@ class CONTENT_EXPORT WebSocketHost {
void OnDropChannel(bool was_clean, uint16_t code, const std::string& reason);
+ void BlobSendComplete(int result);
+
+ // non-NULL if and only if this object is currently in "blob sending mode".
+ scoped_ptr<WebSocketBlobSender> blob_sender_;
+
// The channel we use to send events to the network.
scoped_ptr<net::WebSocketChannel> channel_;

Powered by Google App Engine
This is Rietveld 408576698