| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include "base/file_util_proxy.h" | 8 #include "base/file_util_proxy.h" |
| 9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/scoped_temp_dir.h" | 11 #include "base/scoped_temp_dir.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
| 13 #include "webkit/fileapi/file_system_types.h" | 13 #include "webkit/fileapi/file_system_types.h" |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 namespace WebKit { | 16 namespace WebKit { |
| 17 class WebFileSystemCallbacks; | 17 class WebFileSystemCallbacks; |
| 18 class WebFrame; | 18 class WebFrame; |
| 19 class WebURL; | 19 class WebURL; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace fileapi { | 22 namespace fileapi { |
| 23 class FileSystemContext; | 23 class FileSystemContext; |
| 24 class FileSystemOperation; | 24 class FileSystemOperationInterface; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class SimpleFileSystem | 27 class SimpleFileSystem |
| 28 : public WebKit::WebFileSystem, | 28 : public WebKit::WebFileSystem, |
| 29 public base::SupportsWeakPtr<SimpleFileSystem> { | 29 public base::SupportsWeakPtr<SimpleFileSystem> { |
| 30 public: | 30 public: |
| 31 SimpleFileSystem(); | 31 SimpleFileSystem(); |
| 32 virtual ~SimpleFileSystem(); | 32 virtual ~SimpleFileSystem(); |
| 33 | 33 |
| 34 void OpenFileSystem(WebKit::WebFrame* frame, | 34 void OpenFileSystem(WebKit::WebFrame* frame, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const WebKit::WebURL& path, | 74 const WebKit::WebURL& path, |
| 75 WebKit::WebFileSystemCallbacks*) OVERRIDE; | 75 WebKit::WebFileSystemCallbacks*) OVERRIDE; |
| 76 virtual void readDirectory( | 76 virtual void readDirectory( |
| 77 const WebKit::WebURL& path, | 77 const WebKit::WebURL& path, |
| 78 WebKit::WebFileSystemCallbacks*) OVERRIDE; | 78 WebKit::WebFileSystemCallbacks*) OVERRIDE; |
| 79 virtual WebKit::WebFileWriter* createFileWriter( | 79 virtual WebKit::WebFileWriter* createFileWriter( |
| 80 const WebKit::WebURL& path, WebKit::WebFileWriterClient*) OVERRIDE; | 80 const WebKit::WebURL& path, WebKit::WebFileWriterClient*) OVERRIDE; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // Helpers. | 83 // Helpers. |
| 84 fileapi::FileSystemOperation* GetNewOperation( | 84 fileapi::FileSystemOperationInterface* GetNewOperation( |
| 85 WebKit::WebFileSystemCallbacks* callbacks); | 85 const WebKit::WebURL& path, WebKit::WebFileSystemCallbacks* callbacks); |
| 86 | 86 |
| 87 // A temporary directory for FileSystem API. | 87 // A temporary directory for FileSystem API. |
| 88 ScopedTempDir file_system_dir_; | 88 ScopedTempDir file_system_dir_; |
| 89 | 89 |
| 90 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 90 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem); | 92 DISALLOW_COPY_AND_ASSIGN(SimpleFileSystem); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ | 95 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_FILE_SYSTEM_H_ |
| OLD | NEW |