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

Side by Side Diff: content/child/fileapi/webfilesystem_impl.h

Issue 19387002: Implement Worker-MainThread bridge for FileSystem API 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_ 5 #ifndef CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_
6 #define CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_ 6 #define CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/public/platform/WebFileSystem.h" 11 #include "third_party/WebKit/public/platform/WebFileSystem.h"
11 12
13 namespace base {
14 class MessageLoopProxy;
15 }
16
12 namespace WebKit { 17 namespace WebKit {
13 class WebURL; 18 class WebURL;
14 class WebFileWriter; 19 class WebFileWriter;
15 class WebFileWriterClient; 20 class WebFileWriterClient;
16 } 21 }
17 22
18 namespace content { 23 namespace content {
19 24
25 class ThreadSafeSender;
26
20 class WebFileSystemImpl : public WebKit::WebFileSystem { 27 class WebFileSystemImpl : public WebKit::WebFileSystem {
21 public: 28 public:
22 WebFileSystemImpl(); 29 WebFileSystemImpl(base::MessageLoopProxy* main_thread_loop,
23 virtual ~WebFileSystemImpl() { } 30 ThreadSafeSender* sender);
31 virtual ~WebFileSystemImpl();
24 32
25 // WebFileSystem implementation. 33 // WebFileSystem implementation.
26 virtual void move( 34 virtual void move(
27 const WebKit::WebURL& src_path, 35 const WebKit::WebURL& src_path,
28 const WebKit::WebURL& dest_path, 36 const WebKit::WebURL& dest_path,
29 WebKit::WebFileSystemCallbacks*) OVERRIDE; 37 WebKit::WebFileSystemCallbacks*) OVERRIDE;
30 virtual void copy( 38 virtual void copy(
31 const WebKit::WebURL& src_path, 39 const WebKit::WebURL& src_path,
32 const WebKit::WebURL& dest_path, 40 const WebKit::WebURL& dest_path,
33 WebKit::WebFileSystemCallbacks*) OVERRIDE; 41 WebKit::WebFileSystemCallbacks*) OVERRIDE;
(...skipping 25 matching lines...) Expand all
59 WebKit::WebFileSystemCallbacks*) OVERRIDE; 67 WebKit::WebFileSystemCallbacks*) OVERRIDE;
60 virtual WebKit::WebFileWriter* createFileWriter( 68 virtual WebKit::WebFileWriter* createFileWriter(
61 const WebKit::WebURL& path, WebKit::WebFileWriterClient*) OVERRIDE; 69 const WebKit::WebURL& path, WebKit::WebFileWriterClient*) OVERRIDE;
62 virtual void createFileWriter( 70 virtual void createFileWriter(
63 const WebKit::WebURL& path, 71 const WebKit::WebURL& path,
64 WebKit::WebFileWriterClient*, 72 WebKit::WebFileWriterClient*,
65 WebKit::WebFileSystemCallbacks*) OVERRIDE; 73 WebKit::WebFileSystemCallbacks*) OVERRIDE;
66 virtual void createSnapshotFileAndReadMetadata( 74 virtual void createSnapshotFileAndReadMetadata(
67 const WebKit::WebURL& path, 75 const WebKit::WebURL& path,
68 WebKit::WebFileSystemCallbacks*); 76 WebKit::WebFileSystemCallbacks*);
77
78 private:
79 scoped_refptr<base::MessageLoopProxy> main_thread_loop_;
80 scoped_refptr<ThreadSafeSender> sender_;
69 }; 81 };
70 82
71 } // namespace content 83 } // namespace content
72 84
73 #endif // CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_ 85 #endif // CONTENT_CHILD_FILEAPI_WEBFILESYSTEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698