[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kinuko at chromium.org
kinuko at chromium.org
Wed Dec 22 12:21:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 286784d8c1b9e6f4c574c1d4c2d2ef219f12fee7
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 20 00:47:31 2010 +0000
2010-08-19 Kinuko Yasuda <kinuko at chromium.org>
Reviewed by Darin Fisher.
Add WebKit API for FileSystem API
https://bugs.webkit.org/show_bug.cgi?id=43151
Add asynchronous FileSystem interface to WebKit API for
FileSystem API.
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
* WebKit.gyp:
* public/WebFileError.h: Added.
* public/WebFileSystem.h: Added.
* public/WebFileSystemEntry.h: Added.
* public/WebFileSystemCallbacks.h: Added.
* public/WebKitClient.h:
(WebKit::WebKitClient::fileSystem):
* public/WebFrameClient.h:
(WebKit::WebFrameClient::openFileSystem):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index a714490..3f0d34c 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,5 +1,26 @@
2010-08-19 Kinuko Yasuda <kinuko at chromium.org>
+ Reviewed by Darin Fisher.
+
+ Add WebKit API for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=43151
+
+ Add asynchronous FileSystem interface to WebKit API for
+ FileSystem API.
+ http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
+
+ * WebKit.gyp:
+ * public/WebFileError.h: Added.
+ * public/WebFileSystem.h: Added.
+ * public/WebFileSystemEntry.h: Added.
+ * public/WebFileSystemCallbacks.h: Added.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::fileSystem):
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::openFileSystem):
+
+2010-08-19 Kinuko Yasuda <kinuko at chromium.org>
+
Reviewed by Jian Li.
[Chromium] Rolls Chromium DEPS forward to 56564
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index ee2d15c..65c2eaf 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -163,8 +163,11 @@
'public/WebEventListener.h',
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
+ 'public/WebFileError.h',
'public/WebFileInfo.h',
'public/WebFileSystem.h',
+ 'public/WebFileSystemCallbacks.h',
+ 'public/WebFileSystemEntry.h',
'public/WebFileUtilities.h',
'public/WebFindOptions.h',
'public/WebFloatPoint.h',
diff --git a/WebKit/chromium/public/WebFileError.h b/WebKit/chromium/public/WebFileError.h
new file mode 100644
index 0000000..cfe8882
--- /dev/null
+++ b/WebKit/chromium/public/WebFileError.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef WebFileError_h
+#define WebFileError_h
+
+namespace WebKit {
+
+// File-related error code defined in HTML5 File API.
+enum WebFileError {
+ WebFileErrorNoModificationAllowed = 7,
+ WebFileErrorNotFound = 8,
+ WebFileErrorInvalidState = 11,
+ WebFileErrorInvalidModification = 13,
+ WebFileErrorSecurity = 18,
+ WebFileErrorAbort = 20,
+ WebFileErrorQuotaExceeded = 22,
+ WebFileErrorNotReadable = 24,
+ WebFileErrorEncoding = 26,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h
index a91106e..641c169 100644
--- a/WebKit/chromium/public/WebFileSystem.h
+++ b/WebKit/chromium/public/WebFileSystem.h
@@ -31,12 +31,77 @@
#ifndef WebFileSystem_h
#define WebFileSystem_h
-#include "WebFileUtilities.h"
+#include "WebCommon.h"
+#include "WebString.h"
namespace WebKit {
-// FIXME: Clean up this class once the renaming to WebFileUtilities is done.
-class WebFileSystem : public WebFileUtilities {
+class WebFileSystemCallbacks;
+
+class WebFileSystem {
+public:
+ enum Type {
+ TypeTemporary,
+ TypePersistent,
+ };
+
+ // Moves a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void move(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Copies a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Deletes a file or directory at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void remove(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Retrieves the metadata information of the file or directory at the given |path|.
+ // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void readMetadata(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a file at given |path|.
+ // If the |path| doesn't exist, it creates a new file at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or
+ // it has successfully created a new file at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createFile(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a directory at a given |path|.
+ // If the |path| doesn't exist, it creates a new directory at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when
+ // the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createDirectory(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a file exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void fileExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a directory exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void directoryExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Reads directory entries of a given directory at |path|.
+ // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void readDirectory(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ virtual ~WebFileSystem() { }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebFileSystemCallbacks.h b/WebKit/chromium/public/WebFileSystemCallbacks.h
new file mode 100644
index 0000000..fa7ebbe
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystemCallbacks.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFileSystemCallbacks_h
+#define WebFileSystemCallbacks_h
+
+#include "WebFileError.h"
+#include "WebFileSystemEntry.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebString;
+struct WebFileInfo;
+
+class WebFileSystemCallbacks {
+public:
+ // Callback for WebFileSystem's various operations that don't require
+ // return values.
+ virtual void didSucceed() = 0;
+
+ // Callback for WebFileSystem::readMetadata. Called with the file metadata
+ // for the requested path.
+ virtual void didReadMetadata(const WebFileInfo&) = 0;
+
+ // Callback for WebFileSystem::readDirectory. Called with a vector of
+ // file entries in the requested directory. This callback might be called
+ // multiple times if the directory has many entries. |hasMore| must be
+ // true when there are more entries.
+ virtual void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore) = 0;
+
+ // Callback for WebFrameClient::openFileSystem. Called with a name and
+ // root path for the FileSystem when the request is accepted.
+ virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath) = 0;
+
+ // Called with an error code when a requested operation hasn't been
+ // completed.
+ virtual void didFail(WebFileError) = 0;
+
+protected:
+ virtual ~WebFileSystemCallbacks() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileSystemEntry.h b/WebKit/chromium/public/WebFileSystemEntry.h
new file mode 100644
index 0000000..00a5e38
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystemEntry.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFileSystemEntry_h
+#define WebFileSystemEntry_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+struct WebFileSystemEntry {
+ WebFileSystemEntry() : isDirectory(false) { }
+
+ // The name of the entry.
+ WebString name;
+
+ // This flag indicates if the entry is directory or not.
+ bool isDirectory;
+};
+
+} // namespace WebKit
+
+#endif // WebFileSystemEntry_h
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 91f0e38..699325d 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -32,6 +32,7 @@
#define WebFrameClient_h
#include "WebCommon.h"
+#include "WebFileSystem.h"
#include "WebNavigationPolicy.h"
#include "WebNavigationType.h"
#include "WebURLError.h"
@@ -333,6 +334,19 @@ public:
virtual void reportFindInPageSelection(
int identifier, int activeMatchOrdinal, const WebRect& selection) { }
+ // FileSystem ----------------------------------------------------
+
+ // Requests to open a FileSystem.
+ // |size| indicates how much storage space (in bytes) the caller expects
+ // to need.
+ // WebFileSystemCallbacks::didOpenFileSystem() must be called with
+ // a name and root path for the requested FileSystem when the operation
+ // is completed successfully. WebFileSystemCallbacks::didFail() must be
+ // called otherwise.
+ virtual void openFileSystem(
+ WebFrame*, WebFileSystem::Type, long long size,
+ WebFileSystemCallbacks*) { }
+
protected:
~WebFrameClient() { }
};
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 30f7c9f..17a39c5 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -33,7 +33,6 @@
#include "WebCommon.h"
#include "WebData.h"
-#include "WebFileSystem.h"
#include "WebLocalizedString.h"
#include "WebString.h"
#include "WebURL.h"
@@ -51,6 +50,7 @@ class WebApplicationCacheHostClient;
class WebBlobRegistry;
class WebClipboard;
class WebCookieJar;
+class WebFileSystem;
class WebFileUtilities;
class WebGLES2Context;
class WebGraphicsContext3D;
@@ -74,12 +74,7 @@ public:
virtual WebMimeRegistry* mimeRegistry() { return 0; }
// Must return non-null.
- // FIXME: Clean up this one once the renaming to WebFileUtilities is done.
- virtual WebFileSystem* fileSystem() { return 0; }
-
- // Must return non-null.
- // FIXME: Clean up this one once the renaming from WebFileSystem is done.
- virtual WebFileUtilities* fileUtilities() { return fileSystem(); }
+ virtual WebFileUtilities* fileUtilities() { return 0; }
// May return null if sandbox support is not necessary
virtual WebSandboxSupport* sandboxSupport() { return 0; }
@@ -274,6 +269,11 @@ public:
// May return null if it fails to create the context.
virtual WebGLES2Context* createGLES2Context() { return 0; }
+ // FileSystem ----------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
protected:
~WebKitClient() { }
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list