diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 18:29:24 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 18:29:24 +0000 |
commit | 22339b123c68805c7c293c67f6f47ea45f0fd1a1 (patch) | |
tree | bb05e2e3eb0362338e921a4dce9d5c350437326e /chrome/worker | |
parent | e840afdedd33728491639312a268fbf37a48f078 (diff) | |
download | chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.zip chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.tar.gz chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.tar.bz2 |
Support sending BlobData to browser process. Also support sending UploadData
with the blob info to browser process.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3108042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/worker')
-rw-r--r-- | chrome/worker/worker_thread.cc | 1 | ||||
-rw-r--r-- | chrome/worker/worker_webkitclient_impl.cc | 9 | ||||
-rw-r--r-- | chrome/worker/worker_webkitclient_impl.h | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc index b2e9f18..c493701 100644 --- a/chrome/worker/worker_thread.cc +++ b/chrome/worker/worker_thread.cc @@ -16,6 +16,7 @@ #include "chrome/worker/websharedworker_stub.h" #include "chrome/worker/worker_webkitclient_impl.h" #include "ipc/ipc_sync_channel.h" +#include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" diff --git a/chrome/worker/worker_webkitclient_impl.cc b/chrome/worker/worker_webkitclient_impl.cc index 43a8e2f..b09ca7b 100644 --- a/chrome/worker/worker_webkitclient_impl.cc +++ b/chrome/worker/worker_webkitclient_impl.cc @@ -8,11 +8,14 @@ #include "chrome/common/database_util.h" #include "chrome/common/render_messages.h" #include "chrome/common/render_messages_params.h" +#include "chrome/common/webblobregistry_impl.h" #include "chrome/common/webmessageportchannel_impl.h" #include "chrome/worker/worker_thread.h" +#include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +using WebKit::WebBlobRegistry; using WebKit::WebClipboard; using WebKit::WebKitClient; using WebKit::WebMessagePortChannel; @@ -172,3 +175,9 @@ WebString WorkerWebKitClientImpl::preferredExtensionForMIMEType( NOTREACHED(); return WebString(); } + +WebBlobRegistry* WorkerWebKitClientImpl::blobRegistry() { + if (!blob_registry_.get()) + blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current())); + return blob_registry_.get(); +} diff --git a/chrome/worker/worker_webkitclient_impl.h b/chrome/worker/worker_webkitclient_impl.h index 8a2bd46..6488c56 100644 --- a/chrome/worker/worker_webkitclient_impl.h +++ b/chrome/worker/worker_webkitclient_impl.h @@ -6,6 +6,7 @@ #define CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_ #pragma once +#include "base/scoped_ptr.h" #include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" #include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webkitclient_impl.h" @@ -49,6 +50,8 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl, virtual long long databaseGetFileSize( const WebKit::WebString& vfs_file_name); + virtual WebKit::WebBlobRegistry* blobRegistry(); + // WebMimeRegistry methods: virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( const WebKit::WebString&); @@ -67,6 +70,8 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl, private: webkit_glue::WebFileUtilitiesImpl file_utilities_; + + scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; }; #endif // CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_ |