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

Unified Diff: content/child/webblobregistry_impl.cc

Issue 15817013: Add Stream support to WebBlobRegistry and FileAPIMessageFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/child/webblobregistry_impl.cc
diff --git a/content/child/webblobregistry_impl.cc b/content/child/webblobregistry_impl.cc
index ecd9e1e68e8b070c98f074cb2586314738291f70..daf230473b51d9624944fdc9b5b06dc46b0121ff 100644
--- a/content/child/webblobregistry_impl.cc
+++ b/content/child/webblobregistry_impl.cc
@@ -119,6 +119,13 @@ void WebBlobRegistryImpl::registerBlobURL(
url, data.contentType().utf8().data()));
}
+void WebBlobRegistryImpl::registerStreamURL(
+ const WebURL& url, const WebString& content_type) {
+ DCHECK(ChildThread::current()->message_loop() ==
+ base::MessageLoop::current());
+ sender_->Send(new BlobHostMsg_StartBuildingStream(url, type.utf8()));
+}
+
void WebBlobRegistryImpl::registerBlobURL(
const WebURL& url, const WebURL& src_url) {
DCHECK(ChildThread::current()->message_loop() ==
@@ -126,6 +133,20 @@ void WebBlobRegistryImpl::registerBlobURL(
sender_->Send(new BlobHostMsg_CloneBlob(url, src_url));
}
+void WebBlobRegistryImpl::addDataToStream(const WebKit::WebURL& url,
+ WebKit::WebThreadSafeData& data) {
+ DCHECK(ChildThread::current()->message_loop() ==
+ base::MessageLoop::current());
+ webkit_blob::BlobData::Item item;
+ SendData(url, data, &item);
+}
+
+void WebBlobRegistryImpl::finalizeStream(const WebURL& url) {
+ DCHECK(ChildThread::current()->message_loop() ==
+ base::MessageLoop::current());
+ sender_->Send(new BlobHostMsg_FinishBuildingBlob(url, ""));
+}
+
void WebBlobRegistryImpl::unregisterBlobURL(const WebURL& url) {
DCHECK(ChildThread::current()->message_loop() ==
base::MessageLoop::current());

Powered by Google App Engine
This is Rietveld 408576698