Title: [112106] trunk
Revision
112106
Author
[email protected]
Date
2012-03-26 08:51:32 -0700 (Mon, 26 Mar 2012)

Log Message

[BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=82157

Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake: Turn on ENABLE_FILE_SYSTEM for blackberry.

Source/WebCore:

AsyncFileSystemBlackBerry is responsible for asynchronous operating
on file system for the blackberry porting. It's just skeleton code
containing no implementation yet.

No new tests because of skeleton code.

* PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
* platform/AsyncFileSystem.cpp:
(WebCore):
* platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
(WebCore):
(WebCore::AsyncFileSystem::isAvailable):
(WebCore::AsyncFileSystem::isValidType):
(WebCore::AsyncFileSystem::create):
(WebCore::AsyncFileSystem::openFileSystem):
(WebCore::AsyncFileSystem::crackFileSystemURL):
(WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
(WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
(WebCore::AsyncFileSystemBlackBerry::toURL):
(WebCore::AsyncFileSystemBlackBerry::move):
(WebCore::AsyncFileSystemBlackBerry::copy):
(WebCore::AsyncFileSystemBlackBerry::remove):
(WebCore::AsyncFileSystemBlackBerry::removeRecursively):
(WebCore::AsyncFileSystemBlackBerry::readMetadata):
(WebCore::AsyncFileSystemBlackBerry::createFile):
(WebCore::AsyncFileSystemBlackBerry::createDirectory):
(WebCore::AsyncFileSystemBlackBerry::fileExists):
(WebCore::AsyncFileSystemBlackBerry::directoryExists):
(WebCore::AsyncFileSystemBlackBerry::readDirectory):
(WebCore::AsyncFileSystemBlackBerry::createWriter):
(WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
* platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
(WebCore):
(AsyncFileSystemBlackBerry):

Tools:

* Scripts/build-webkit:
Make ENABLE_FILE_SYSTEM default on for blackberry.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (112105 => 112106)


--- trunk/ChangeLog	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/ChangeLog	2012-03-26 15:51:32 UTC (rev 112106)
@@ -1,3 +1,12 @@
+2012-03-26  Leo Yang  <[email protected]>
+
+        [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=82157
+
+        Reviewed by Rob Buis.
+
+        * Source/cmake/OptionsBlackBerry.cmake: Turn on ENABLE_FILE_SYSTEM for blackberry.
+
 2012-03-25  Hayato Ito  <[email protected]>
 
         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.

Modified: trunk/Source/WebCore/ChangeLog (112105 => 112106)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 15:51:32 UTC (rev 112106)
@@ -1,3 +1,45 @@
+2012-03-26  Leo Yang  <[email protected]>
+
+        [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=82157
+
+        Reviewed by Rob Buis.
+
+        AsyncFileSystemBlackBerry is responsible for asynchronous operating
+        on file system for the blackberry porting. It's just skeleton code
+        containing no implementation yet.
+
+        No new tests because of skeleton code.
+
+        * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
+        * platform/AsyncFileSystem.cpp:
+        (WebCore):
+        * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
+        (WebCore):
+        (WebCore::AsyncFileSystem::isAvailable):
+        (WebCore::AsyncFileSystem::isValidType):
+        (WebCore::AsyncFileSystem::create):
+        (WebCore::AsyncFileSystem::openFileSystem):
+        (WebCore::AsyncFileSystem::crackFileSystemURL):
+        (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
+        (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
+        (WebCore::AsyncFileSystemBlackBerry::toURL):
+        (WebCore::AsyncFileSystemBlackBerry::move):
+        (WebCore::AsyncFileSystemBlackBerry::copy):
+        (WebCore::AsyncFileSystemBlackBerry::remove):
+        (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
+        (WebCore::AsyncFileSystemBlackBerry::readMetadata):
+        (WebCore::AsyncFileSystemBlackBerry::createFile):
+        (WebCore::AsyncFileSystemBlackBerry::createDirectory):
+        (WebCore::AsyncFileSystemBlackBerry::fileExists):
+        (WebCore::AsyncFileSystemBlackBerry::directoryExists):
+        (WebCore::AsyncFileSystemBlackBerry::readDirectory):
+        (WebCore::AsyncFileSystemBlackBerry::createWriter):
+        (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
+        * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
+        (WebCore):
+        (AsyncFileSystemBlackBerry):
+
 2012-03-26  Jonathan Dong  <[email protected]>
 
         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()

Modified: trunk/Source/WebCore/PlatformBlackBerry.cmake (112105 => 112106)


--- trunk/Source/WebCore/PlatformBlackBerry.cmake	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Source/WebCore/PlatformBlackBerry.cmake	2012-03-26 15:51:32 UTC (rev 112106)
@@ -181,6 +181,13 @@
     platform/network/blackberry/CredentialStorageBlackBerry.cpp
 )
 
+# File System support
+IF (ENABLE_FILE_SYSTEM)
+    LIST(APPEND WebCore_SOURCES
+        platform/blackberry/AsyncFileSystemBlackBerry.cpp
+    )
+ENDIF ()
+
 # Touch sources
 LIST(APPEND WebCore_SOURCES
     dom/Touch.cpp

Modified: trunk/Source/WebCore/platform/AsyncFileSystem.cpp (112105 => 112106)


--- trunk/Source/WebCore/platform/AsyncFileSystem.cpp	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Source/WebCore/platform/AsyncFileSystem.cpp	2012-03-26 15:51:32 UTC (rev 112106)
@@ -45,7 +45,7 @@
 const char AsyncFileSystem::temporaryPathPrefix[] = "temporary";
 const size_t AsyncFileSystem::temporaryPathPrefixLength = sizeof(AsyncFileSystem::temporaryPathPrefix) - 1;
 
-#if !PLATFORM(CHROMIUM) && !PLATFORM(GTK)
+#if !PLATFORM(CHROMIUM) && !PLATFORM(GTK) && !PLATFORM(BLACKBERRY)
 bool AsyncFileSystem::isAvailable()
 {
     notImplemented();

Added: trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp (0 => 112106)


--- trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp	2012-03-26 15:51:32 UTC (rev 112106)
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystemBlackBerry.h"
+
+#include "AsyncFileSystemCallbacks.h"
+#include "ExceptionCode.h"
+#include "NotImplemented.h"
+
+#include <wtf/UnusedParam.h>
+
+namespace WebCore {
+
+bool AsyncFileSystem::isAvailable()
+{
+    notImplemented();
+    return false;
+}
+
+bool AsyncFileSystem::isValidType(Type type)
+{
+    UNUSED_PARAM(type);
+
+    notImplemented();
+    return false;
+}
+
+PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(Type type)
+{
+    return adoptPtr(new AsyncFileSystemBlackBerry(type));
+}
+
+void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, bool, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(basePath);
+    UNUSED_PARAM(storageIdentifier);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+    callbacks->didFail(NOT_SUPPORTED_ERR);
+}
+
+bool AsyncFileSystem::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type& type, String& filePath)
+{
+    UNUSED_PARAM(url);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(filePath);
+
+    notImplemented();
+    return false;
+}
+
+AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry(AsyncFileSystem::Type type)
+    : AsyncFileSystem(type)
+{
+    notImplemented();
+}
+
+AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry()
+{
+    notImplemented();
+}
+
+String AsyncFileSystemBlackBerry::toURL(const String& originString, const String& fullPath)
+{
+    UNUSED_PARAM(originString);
+    UNUSED_PARAM(fullPath);
+
+    notImplemented();
+    return String();
+}
+
+void AsyncFileSystemBlackBerry::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(sourcePath);
+    UNUSED_PARAM(destinationPath);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(sourcePath);
+    UNUSED_PARAM(destinationPath);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(exclusive);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(exclusive);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+
+void AsyncFileSystemBlackBerry::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(client);
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+void AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    UNUSED_PARAM(path);
+    UNUSED_PARAM(callbacks);
+
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)

Added: trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h (0 => 112106)


--- trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h	2012-03-26 15:51:32 UTC (rev 112106)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#ifndef AsyncFileSystemBlackBerry_h
+#define AsyncFileSystemBlackBerry_h
+
+#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystem.h"
+
+namespace WebCore {
+
+class AsyncFileSystemBlackBerry : public AsyncFileSystem {
+public:
+    AsyncFileSystemBlackBerry(AsyncFileSystem::Type);
+    virtual ~AsyncFileSystemBlackBerry();
+    virtual String toURL(const String& originString, const String& fullPath);
+    virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createWriter(AsyncFileWriterClient*, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createSnapshotFileAndReadMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // AsyncFileSystemBlackBerry_h

Modified: trunk/Source/cmake/OptionsBlackBerry.cmake (112105 => 112106)


--- trunk/Source/cmake/OptionsBlackBerry.cmake	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Source/cmake/OptionsBlackBerry.cmake	2012-03-26 15:51:32 UTC (rev 112106)
@@ -141,7 +141,7 @@
 WEBKIT_FEATURE(ENABLE_EVENTSOURCE "Enable event source" DEFAULT ON)
 WEBKIT_FEATURE(ENABLE_EVENT_MODE_METATAGS "Enable meta-tag touch and mouse events" DEFAULT ON)
 WEBKIT_FEATURE(ENABLE_FAST_MOBILE_SCROLLING "Enable fast mobile scrolling" DEFAULT ON)
-WEBKIT_FEATURE(ENABLE_FILE_SYSTEM "Enable file system" DEFAULT OFF)
+WEBKIT_FEATURE(ENABLE_FILE_SYSTEM "Enable file system" DEFAULT ON)
 WEBKIT_FEATURE(ENABLE_FILTERS "Enable SVG filters" DEFAULT ON)
 WEBKIT_FEATURE(ENABLE_FIXED_REPORTED_SIZE "Fixed Reported Size" DEFAULT ON)
 WEBKIT_FEATURE(ENABLE_FTPDIR "Enable FTP directory browsing" DEFAULT ON)

Modified: trunk/Tools/ChangeLog (112105 => 112106)


--- trunk/Tools/ChangeLog	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Tools/ChangeLog	2012-03-26 15:51:32 UTC (rev 112106)
@@ -1,3 +1,13 @@
+2012-03-26  Leo Yang  <[email protected]>
+
+        [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=82157
+
+        Reviewed by Rob Buis.
+
+        * Scripts/build-webkit:
+        Make ENABLE_FILE_SYSTEM default on for blackberry.
+
 2012-03-26  Raphael Kubo da Costa  <[email protected]>
 
         [jhbuild] Explicitly disable DTrace when building glib.

Modified: trunk/Tools/Scripts/build-webkit (112105 => 112106)


--- trunk/Tools/Scripts/build-webkit	2012-03-26 15:50:09 UTC (rev 112105)
+++ trunk/Tools/Scripts/build-webkit	2012-03-26 15:51:32 UTC (rev 112106)
@@ -201,7 +201,7 @@
       define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport },
 
     { option => "file-system", desc => "Toggle FileSystem support",
-      define => "ENABLE_FILE_SYSTEM", default => 0, value => \$fileSystemSupport },
+      define => "ENABLE_FILE_SYSTEM", default => isBlackBerry(), value => \$fileSystemSupport },
 
     { option => "filters", desc => "Toggle SVG Filters support",
       define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt() || isEfl() || isBlackBerry()), value => \$filtersSupport },
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to