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

Unified Diff: content/child/fileapi/webfilewriter_impl.h

Issue 21041003: Implement Worker-MainThread bridge for FileWriter in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/fileapi/webfilesystem_impl.cc ('k') | content/child/fileapi/webfilewriter_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/fileapi/webfilewriter_impl.h
diff --git a/content/child/fileapi/webfilewriter_impl.h b/content/child/fileapi/webfilewriter_impl.h
index 718139d966286f45e20ceebaa41d5eadd992e36f..a9e574e3ea91d62a86d35de9f369d0842952aa5e 100644
--- a/content/child/fileapi/webfilewriter_impl.h
+++ b/content/child/fileapi/webfilewriter_impl.h
@@ -7,6 +7,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "webkit/renderer/fileapi/webfilewriter_base.h"
namespace content {
@@ -15,7 +16,9 @@ namespace content {
class WebFileWriterImpl : public fileapi::WebFileWriterBase,
public base::SupportsWeakPtr<WebFileWriterImpl> {
public:
- WebFileWriterImpl(const GURL& path, WebKit::WebFileWriterClient* client);
+ WebFileWriterImpl(const GURL& path,
+ WebKit::WebFileWriterClient* client,
+ base::MessageLoopProxy* main_thread_loop);
virtual ~WebFileWriterImpl();
protected:
@@ -26,8 +29,12 @@ class WebFileWriterImpl : public fileapi::WebFileWriterBase,
virtual void DoCancel() OVERRIDE;
private:
- class CallbackDispatcher;
- int request_id_;
+ class WriterBridge;
+
+ void RunOnMainThread(const base::Closure& closure);
+
+ scoped_refptr<base::MessageLoopProxy> main_thread_loop_;
+ scoped_refptr<WriterBridge> bridge_;
};
} // namespace content
« no previous file with comments | « content/child/fileapi/webfilesystem_impl.cc ('k') | content/child/fileapi/webfilewriter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698