Changeset 65718 in webkit
- Timestamp:
- Aug 19, 2010 5:47:31 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r65715 r65718 1 2010-08-19 Kinuko Yasuda <kinuko@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Add WebKit API for FileSystem API 6 https://bugs.webkit.org/show_bug.cgi?id=43151 7 8 Add asynchronous FileSystem interface to WebKit API for 9 FileSystem API. 10 http://dev.w3.org/2009/dap/file-system/file-dir-sys.html 11 12 * WebKit.gyp: 13 * public/WebFileError.h: Added. 14 * public/WebFileSystem.h: Added. 15 * public/WebFileSystemEntry.h: Added. 16 * public/WebFileSystemCallbacks.h: Added. 17 * public/WebKitClient.h: 18 (WebKit::WebKitClient::fileSystem): 19 * public/WebFrameClient.h: 20 (WebKit::WebFrameClient::openFileSystem): 21 1 22 2010-08-19 Kinuko Yasuda <kinuko@chromium.org> 2 23 -
trunk/WebKit/chromium/WebKit.gyp
r65688 r65718 164 164 'public/WebFileChooserCompletion.h', 165 165 'public/WebFileChooserParams.h', 166 'public/WebFileError.h', 166 167 'public/WebFileInfo.h', 167 168 'public/WebFileSystem.h', 169 'public/WebFileSystemCallbacks.h', 170 'public/WebFileSystemEntry.h', 168 171 'public/WebFileUtilities.h', 169 172 'public/WebFindOptions.h', -
trunk/WebKit/chromium/public/WebFileSystem.h
r65482 r65718 32 32 #define WebFileSystem_h 33 33 34 #include "WebFileUtilities.h" 34 #include "WebCommon.h" 35 #include "WebString.h" 35 36 36 37 namespace WebKit { 37 38 38 // FIXME: Clean up this class once the renaming to WebFileUtilities is done. 39 class WebFileSystem : public WebFileUtilities { 39 class WebFileSystemCallbacks; 40 41 class WebFileSystem { 42 public: 43 enum Type { 44 TypeTemporary, 45 TypePersistent, 46 }; 47 48 // Moves a file or directory at |srcPath| to |destPath|. 49 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 50 // WebFileSystemCallbacks::didFail() must be called otherwise. 51 virtual void move(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 52 53 // Copies a file or directory at |srcPath| to |destPath|. 54 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 55 // WebFileSystemCallbacks::didFail() must be called otherwise. 56 virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 57 58 // Deletes a file or directory at a given |path|. 59 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 60 // WebFileSystemCallbacks::didFail() must be called otherwise. 61 virtual void remove(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 62 63 // Retrieves the metadata information of the file or directory at the given |path|. 64 // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully. 65 // WebFileSystemCallbacks::didFail() must be called otherwise. 66 virtual void readMetadata(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 67 68 // Creates a file at given |path|. 69 // If the |path| doesn't exist, it creates a new file at |path|. 70 // If |exclusive| is true, it fails if the |path| already exists. 71 // If |exclusive| is false, it succeeds if the |path| already exists or 72 // it has successfully created a new file at |path|. 73 // 74 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 75 // WebFileSystemCallbacks::didFail() must be called otherwise. 76 virtual void createFile(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 77 78 // Creates a directory at a given |path|. 79 // If the |path| doesn't exist, it creates a new directory at |path|. 80 // If |exclusive| is true, it fails if the |path| already exists. 81 // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|. 82 // 83 // WebFileSystemCallbacks::didSucceed() must be called when 84 // the operation is completed successfully. 85 // WebFileSystemCallbacks::didFail() must be called otherwise. 86 virtual void createDirectory(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 87 88 // Checks if a file exists at a given |path|. 89 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 90 // WebFileSystemCallbacks::didFail() must be called otherwise. 91 virtual void fileExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 92 93 // Checks if a directory exists at a given |path|. 94 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 95 // WebFileSystemCallbacks::didFail() must be called otherwise. 96 virtual void directoryExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 97 98 // Reads directory entries of a given directory at |path|. 99 // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully. 100 // WebFileSystemCallbacks::didFail() must be called otherwise. 101 virtual void readDirectory(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 102 103 protected: 104 virtual ~WebFileSystem() { } 40 105 }; 41 106 -
trunk/WebKit/chromium/public/WebFrameClient.h
r65604 r65718 33 33 34 34 #include "WebCommon.h" 35 #include "WebFileSystem.h" 35 36 #include "WebNavigationPolicy.h" 36 37 #include "WebNavigationType.h" … … 334 335 int identifier, int activeMatchOrdinal, const WebRect& selection) { } 335 336 337 // FileSystem ---------------------------------------------------- 338 339 // Requests to open a FileSystem. 340 // |size| indicates how much storage space (in bytes) the caller expects 341 // to need. 342 // WebFileSystemCallbacks::didOpenFileSystem() must be called with 343 // a name and root path for the requested FileSystem when the operation 344 // is completed successfully. WebFileSystemCallbacks::didFail() must be 345 // called otherwise. 346 virtual void openFileSystem( 347 WebFrame*, WebFileSystem::Type, long long size, 348 WebFileSystemCallbacks*) { } 349 336 350 protected: 337 351 ~WebFrameClient() { } -
trunk/WebKit/chromium/public/WebKitClient.h
r65637 r65718 34 34 #include "WebCommon.h" 35 35 #include "WebData.h" 36 #include "WebFileSystem.h"37 36 #include "WebLocalizedString.h" 38 37 #include "WebString.h" … … 52 51 class WebClipboard; 53 52 class WebCookieJar; 53 class WebFileSystem; 54 54 class WebFileUtilities; 55 55 class WebGLES2Context; … … 75 75 76 76 // Must return non-null. 77 // FIXME: Clean up this one once the renaming to WebFileUtilities is done. 78 virtual WebFileSystem* fileSystem() { return 0; } 79 80 // Must return non-null. 81 // FIXME: Clean up this one once the renaming from WebFileSystem is done. 82 virtual WebFileUtilities* fileUtilities() { return fileSystem(); } 77 virtual WebFileUtilities* fileUtilities() { return 0; } 83 78 84 79 // May return null if sandbox support is not necessary … … 275 270 virtual WebGLES2Context* createGLES2Context() { return 0; } 276 271 272 // FileSystem ---------------------------------------------------------- 273 274 // Must return non-null. 275 virtual WebFileSystem* fileSystem() { return 0; } 276 277 277 protected: 278 278 ~WebKitClient() { }
Note: See TracChangeset
for help on using the changeset viewer.