Title: [157320] trunk/Source/WebKit2
Revision
157320
Author
beid...@apple.com
Date
2013-10-11 15:12:17 -0700 (Fri, 11 Oct 2013)

Log Message

Lay the groundwork for a multi-process aware Indexed DB implementation in WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=122675

Reviewed by Alexey Proskuryakov.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebKit2.xcodeproj/project.pbxproj:

* WebProcess/IndexedDB/WebIDBFactoryBackend.cpp: Added.
(WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
(WebKit::WebIDBFactoryBackend::~WebIDBFactoryBackend):
(WebKit::WebIDBFactoryBackend::getDatabaseNames):
(WebKit::WebIDBFactoryBackend::open):
(WebKit::WebIDBFactoryBackend::deleteDatabase):
* WebProcess/IndexedDB/WebIDBFactoryBackend.h: Added.
(WebKit::WebIDBFactoryBackend::create):

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend): Return a WebIDBFactoryBackend.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/CMakeLists.txt (157319 => 157320)


--- trunk/Source/WebKit2/CMakeLists.txt	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/CMakeLists.txt	2013-10-11 22:12:17 UTC (rev 157320)
@@ -38,6 +38,7 @@
     "${WEBKIT2_DIR}/WebProcess/Geolocation"
     "${WEBKIT2_DIR}/WebProcess/NetworkInfo"
     "${WEBKIT2_DIR}/WebProcess/IconDatabase"
+    "${WEBKIT2_DIR}/WebProcess/IndexedDB"
     "${WEBKIT2_DIR}/WebProcess/InjectedBundle"
     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API"
     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c"
@@ -415,6 +416,8 @@
 
     WebProcess/IconDatabase/WebIconDatabaseProxy.cpp
 
+    WebProcess/IndexedDB/WebIDBFactoryBackend.cpp
+
     WebProcess/InjectedBundle/InjectedBundle.cpp
     WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp
     WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp

Modified: trunk/Source/WebKit2/ChangeLog (157319 => 157320)


--- trunk/Source/WebKit2/ChangeLog	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/ChangeLog	2013-10-11 22:12:17 UTC (rev 157320)
@@ -1,3 +1,27 @@
+2013-10-11  Brady Eidson  <beid...@apple.com>
+
+        Lay the groundwork for a multi-process aware Indexed DB implementation in WebKit2.
+        https://bugs.webkit.org/show_bug.cgi?id=122675
+
+        Reviewed by Alexey Proskuryakov.
+
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * WebKit2.xcodeproj/project.pbxproj:
+
+        * WebProcess/IndexedDB/WebIDBFactoryBackend.cpp: Added.
+        (WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
+        (WebKit::WebIDBFactoryBackend::~WebIDBFactoryBackend):
+        (WebKit::WebIDBFactoryBackend::getDatabaseNames):
+        (WebKit::WebIDBFactoryBackend::open):
+        (WebKit::WebIDBFactoryBackend::deleteDatabase):
+        * WebProcess/IndexedDB/WebIDBFactoryBackend.h: Added.
+        (WebKit::WebIDBFactoryBackend::create):
+
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::createIDBFactoryBackend): Return a WebIDBFactoryBackend.
+
 2013-10-11  Anders Carlsson  <ander...@apple.com>
 
         Remove ENABLE(GESTURE_EVENTS) from WebKit2

Modified: trunk/Source/WebKit2/GNUmakefile.am (157319 => 157320)


--- trunk/Source/WebKit2/GNUmakefile.am	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/GNUmakefile.am	2013-10-11 22:12:17 UTC (rev 157320)
@@ -143,6 +143,7 @@
 	-I$(srcdir)/Source/WebKit2/WebProcess/Geolocation \
 	-I$(srcdir)/Source/WebKit2/WebProcess/gtk \
 	-I$(srcdir)/Source/WebKit2/WebProcess/IconDatabase \
+	-I$(srcdir)/Source/WebKit2/WebProcess/IndexedDB \
 	-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
 	-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API \
 	-I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \

Modified: trunk/Source/WebKit2/GNUmakefile.list.am (157319 => 157320)


--- trunk/Source/WebKit2/GNUmakefile.list.am	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/GNUmakefile.list.am	2013-10-11 22:12:17 UTC (rev 157320)
@@ -1040,6 +1040,8 @@
 	Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h \
 	Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp \
 	Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.h \
+	Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.cpp \
+	Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.h \
 	Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h \
 	Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp \
 	Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h \

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (157319 => 157320)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2013-10-11 22:12:17 UTC (rev 157320)
@@ -412,6 +412,7 @@
 		511B24AB132E097200065A0C /* WebIconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 511B24A9132E097200065A0C /* WebIconDatabase.h */; };
 		511F8A7B138B460900A95F44 /* SecItemShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F8A77138B460900A95F44 /* SecItemShimLibrary.h */; };
 		511F8A81138B485D00A95F44 /* SecItemShimLibrary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */; };
+		511F8EDD180881850047DA96 /* WebIDBFactoryBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511F8EDB1808817D0047DA96 /* WebIDBFactoryBackend.cpp */; };
 		51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5121745E164C20E30037A5C1 /* ShareableResource.cpp */; };
 		51217461164C20E30037A5C1 /* ShareableResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 5121745F164C20E30037A5C1 /* ShareableResource.h */; };
 		51217464164C21370037A5C1 /* WebResourceBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51217462164C21370037A5C1 /* WebResourceBuffer.cpp */; };
@@ -1800,6 +1801,8 @@
 		511B24A9132E097200065A0C /* WebIconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabase.h; sourceTree = "<group>"; };
 		511F8A77138B460900A95F44 /* SecItemShimLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecItemShimLibrary.h; path = ../../WebProcess/mac/SecItemShimLibrary.h; sourceTree = "<group>"; };
 		511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SecItemShimLibrary.mm; path = ../../WebProcess/mac/SecItemShimLibrary.mm; sourceTree = "<group>"; };
+		511F8EDB1808817D0047DA96 /* WebIDBFactoryBackend.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = WebIDBFactoryBackend.cpp; path = IndexedDB/WebIDBFactoryBackend.cpp; sourceTree = "<group>"; };
+		511F8EDC1808817D0047DA96 /* WebIDBFactoryBackend.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebIDBFactoryBackend.h; path = IndexedDB/WebIDBFactoryBackend.h; sourceTree = "<group>"; };
 		5121745E164C20E30037A5C1 /* ShareableResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShareableResource.cpp; sourceTree = "<group>"; };
 		5121745F164C20E30037A5C1 /* ShareableResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableResource.h; sourceTree = "<group>"; };
 		51217462164C21370037A5C1 /* WebResourceBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceBuffer.cpp; sourceTree = "<group>"; };
@@ -3501,6 +3504,15 @@
 			path = Network;
 			sourceTree = "<group>";
 		};
+		511F8EDA180881660047DA96 /* IndexedDB */ = {
+			isa = PBXGroup;
+			children = (
+				511F8EDB1808817D0047DA96 /* WebIDBFactoryBackend.cpp */,
+				511F8EDC1808817D0047DA96 /* WebIDBFactoryBackend.h */,
+			);
+			name = IndexedDB;
+			sourceTree = "<group>";
+		};
 		5123CF18133D25E60056F800 /* cg */ = {
 			isa = PBXGroup;
 			children = (
@@ -3696,6 +3708,7 @@
 				CD73BA3D131A2A2100EEDED2 /* FullScreen */,
 				BC0E5FCB12D696DD0012A72A /* Geolocation */,
 				51FBB9C1132E079200F327B4 /* IconDatabase */,
+				511F8EDA180881660047DA96 /* IndexedDB */,
 				BC204EDF11C83E72008F3375 /* InjectedBundle */,
 				1A6FA01C11E1526300DB1371 /* mac */,
 				33D3A3BD1339609800709BE4 /* MediaCache */,
@@ -6108,6 +6121,7 @@
 				5D51845513BCF9CC00C7FF4A /* APIClientTraits.cpp in Sources */,
 				B63403F914910D57001070B5 /* APIObject.cpp in Sources */,
 				1A3D610513A7F03A00F95D4E /* ArgumentCoders.cpp in Sources */,
+				511F8EDD180881850047DA96 /* WebIDBFactoryBackend.cpp in Sources */,
 				1AAF0C4B12B16334008E49E2 /* ArgumentCodersCF.cpp in Sources */,
 				E179FD9F134D38250015B883 /* ArgumentCodersMac.mm in Sources */,
 				BC032DA510F437D10058C15A /* ArgumentDecoder.cpp in Sources */,

Added: trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.cpp (0 => 157320)


--- trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.cpp	2013-10-11 22:12:17 UTC (rev 157320)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2013 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``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 APPLE COMPUTER, INC. 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.
+ *
+ */
+
+#include "config.h"
+#include "WebIDBFactoryBackend.h"
+
+#include <WebCore/NotImplemented.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIDBFactoryBackend::WebIDBFactoryBackend()
+{
+}
+
+
+WebIDBFactoryBackend::~WebIDBFactoryBackend()
+{
+}
+
+void WebIDBFactoryBackend::getDatabaseNames(PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, ScriptExecutionContext*, const String&)
+{
+    LOG_ERROR("IDBFactory::getDatabaseNames is no longer exposed to the web as _javascript_ API and should be removed. It will be once we move the Web Inspector away of of it.");
+    notImplemented();
+}
+
+void WebIDBFactoryBackend::open(const String& databaseName, int64_t version, int64_t transactionId, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, PassRefPtr<SecurityOrigin>, ScriptExecutionContext*, const String&)
+{
+    notImplemented();
+}
+
+void WebIDBFactoryBackend::deleteDatabase(const String& databaseName, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, ScriptExecutionContext*, const String&)
+{
+    notImplemented();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INDEXED_DATABASE)

Added: trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.h (0 => 157320)


--- trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.h	                        (rev 0)
+++ trunk/Source/WebKit2/WebProcess/IndexedDB/WebIDBFactoryBackend.h	2013-10-11 22:12:17 UTC (rev 157320)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2013 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``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 APPLE COMPUTER, INC. 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 WebIDBFactoryBackend_h
+#define WebIDBFactoryBackend_h
+
+#include <WebCore/IDBFactoryBackendInterface.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebKit {
+
+class WebIDBFactoryBackend : public WebCore::IDBFactoryBackendInterface {
+public:
+    static PassRefPtr<WebIDBFactoryBackend> create() { return adoptRef(new WebIDBFactoryBackend); }
+
+    virtual ~WebIDBFactoryBackend();
+
+    virtual void getDatabaseNames(PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir);
+    virtual void open(const String& name, int64_t version, int64_t transactionId, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir);
+    virtual void deleteDatabase(const String& name, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir);
+
+private:
+    WebIDBFactoryBackend();
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // WebIDBFactoryBackend_h

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (157319 => 157320)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-10-11 21:14:06 UTC (rev 157319)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-10-11 22:12:17 UTC (rev 157320)
@@ -38,6 +38,7 @@
 #include "WebFrame.h"
 #include "WebFrameLoaderClient.h"
 #include "WebFrameNetworkingContext.h"
+#include "WebIDBFactoryBackend.h"
 #include "WebPage.h"
 #include "WebProcess.h"
 #include "WebProcessProxyMessages.h"
@@ -218,7 +219,7 @@
 #if ENABLE(INDEXED_DATABASE)
 PassRefPtr<IDBFactoryBackendInterface> WebPlatformStrategies::createIDBFactoryBackend()
 {
-    return DatabaseStrategy::createIDBFactoryBackend();
+    return WebIDBFactoryBackend::create();
 }
 #endif // ENABLE(INDEXED_DATABASE)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to