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

Unified Diff: content/child/websocket_bridge.cc

Issue 1574213003: [ABANDONED] Use new Websocket SendBlob IPC from renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@websocket_blob_send_sender
Patch Set: Comment that bufferedAmount may be temporarily too low. 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
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/child/websocket_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/websocket_bridge.cc
diff --git a/content/child/websocket_bridge.cc b/content/child/websocket_bridge.cc
index 7cfff1ad50a942960024e79ac8d98377e363642d..5456b622e0a5046a370b8f7c0e2e0ce900721dd0 100644
--- a/content/child/websocket_bridge.cc
+++ b/content/child/websocket_bridge.cc
@@ -70,6 +70,7 @@ bool WebSocketBridge::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(WebSocketMsg_NotifyFinishOpeningHandshake,
DidFinishOpeningHandshake)
IPC_MESSAGE_HANDLER(WebSocketMsg_NotifyFailure, DidFail)
+ IPC_MESSAGE_HANDLER(WebSocketMsg_BlobSendComplete, DidCompleteSendingBlob)
IPC_MESSAGE_HANDLER(WebSocketMsg_SendFrame, DidReceiveData)
IPC_MESSAGE_HANDLER(WebSocketMsg_FlowControl, DidReceiveFlowControl)
IPC_MESSAGE_HANDLER(WebSocketMsg_DropChannel, DidClose)
@@ -140,6 +141,13 @@ void WebSocketBridge::DidFail(const std::string& message) {
// |this| can be deleted here.
}
+void WebSocketBridge::DidCompleteSendingBlob() {
+ DVLOG(1) << "WebSocketBridge::DidCompleteSendingBlob()";
+ if (client_)
+ client_->didCompleteSendingBlob(this);
+ // |this| can be deleted here.
+}
+
void WebSocketBridge::DidReceiveData(bool fin,
WebSocketMessageType type,
const std::vector<char>& data) {
@@ -256,6 +264,18 @@ void WebSocketBridge::send(bool fin,
std::vector<char>(data, data + size)));
}
+void WebSocketBridge::sendBlob(const blink::WebString& uuid,
+ uint64_t expected_size) {
+ if (channel_id_ == kInvalidChannelId)
+ return;
+
+ DVLOG(1) << "Bridge #" << channel_id_ << " SendBlob(" << uuid.utf8() << ", "
+ << expected_size << ")";
+
+ ChildThreadImpl::current()->Send(
+ new WebSocketHostMsg_SendBlob(channel_id_, uuid.utf8(), expected_size));
+}
+
void WebSocketBridge::flowControl(int64_t quota) {
if (channel_id_ == kInvalidChannelId)
return;
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/child/websocket_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698