[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreip at google.com
andreip at google.com
Wed Dec 22 11:35:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f9fe235a637f9c368282d6c228f8cbf1001c4a67
Author: andreip at google.com <andreip at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 30 10:48:22 2010 +0000
2010-07-26 Andrei Popescu <andreip at google.com>
Reviewed by Jeremy Orlow.
[IndexedDB] IndexedDatabase should be called IDBFactory.
https://bugs.webkit.org/show_bug.cgi?id=42967
Rename IndexedDatabase to IDBFactory to match the specification.
Also implement the following new naming convention:
IDBFoo IDL interfaces are implemented using IDBFoo C++ classes.
IDBFoo objects have pointers to IDBFooBackendInterface objects.
IDBFooBackendInterface is implemented by IDBFooBackendImpl and
IDBFooBackendProxy (for Chromium).
No new tests needed, just renaming.
* Android.derived.jscbindings.mk:
* Android.derived.v8bindings.mk:
* Android.mk:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.pri:
* WebCore.pro:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::clear):
(WebCore::DOMWindow::indexedDB):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/PageGroup.cpp:
(WebCore::PageGroup::idbFactory):
* page/PageGroup.h:
* platform/chromium/ChromiumBridge.h:
* storage/IDBAny.cpp:
(WebCore::IDBAny::idbFactory):
(WebCore::IDBAny::set):
* storage/IDBAny.h:
(WebCore::IDBAny::):
* storage/IDBDatabaseRequest.cpp:
* storage/IDBFactory.cpp: Added.
(WebCore::IDBFactory::IDBFactory):
(WebCore::IDBFactory::~IDBFactory):
(WebCore::IDBFactory::open):
* storage/IDBFactory.h: Added.
(WebCore::IDBFactory::create):
* storage/IDBFactory.idl: Added.
* storage/IDBFactoryBackendInterface.cpp: Added.
(WebCore::IDBFactoryBackendInterface::create):
* storage/IDBFactoryBackendInterface.h: Added.
(WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
* storage/IDBFactoryBackendImpl.cpp: Added.
(WebCore::IDBFactoryBackendImpl::create):
(WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
(WebCore::IDBFactoryBackendImpl::~IDBFactoryBackendImpl):
(WebCore::IDBFactoryBackendImpl::open):
* storage/IDBFactoryBackendImpl.h: Added.
* storage/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::leftBound):
(WebCore::IDBKeyRange::rightBound):
(WebCore::IDBKeyRange::bound):
* storage/IDBKeyRange.h:
* storage/IDBKeyRange.idl:
* storage/IndexedDatabase.cpp: Removed.
* storage/IndexedDatabase.h: Removed.
* storage/IndexedDatabaseImpl.cpp: Removed.
* storage/IndexedDatabaseImpl.h: Removed.
* storage/IndexedDatabaseRequest.cpp: Removed.
* storage/IndexedDatabaseRequest.h: Removed.
* storage/IndexedDatabaseRequest.idl: Removed.
* storage/chromium/IDBFactoryBackendInterface.cpp: Added.
(WebCore::IDBFactoryBackendInterface::create):
* storage/chromium/IndexedDatabase.cpp: Removed.
2010-07-26 Andrei Popescu <andreip at google.com>
Reviewed by Jeremy Orlow.
[IndexedDB] IndexedDatabase should be called IDBFactory.
https://bugs.webkit.org/show_bug.cgi?id=42967
* WebKit.gyp:
* public/WebIDBFactory.h: Added.
(WebKit::WebIDBFactory::~WebIDBFactory):
(WebKit::WebIDBFactory::databases):
(WebKit::WebIDBFactory::open):
* public/WebIndexedDatabase.h: Removed.
* public/WebKitClient.h:
(WebKit::WebKitClient::idbFactory):
* src/ChromiumBridge.cpp:
(WebCore::ChromiumBridge::idbFactory):
* src/IDBFactoryBackendProxy.cpp: Added.
(WebCore::IDBFactoryBackendProxy::create):
(WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy):
(WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy):
(WebCore::IDBFactoryBackendProxy::open):
* src/IDBFactoryBackendProxy.h: Added.
* src/IndexedDatabaseProxy.cpp: Removed.
* src/IndexedDatabaseProxy.h: Removed.
* src/WebIDBFactoryImpl.cpp: Added.
(WebKit::WebIDBFactory::create):
(WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl):
(WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl):
(WebKit::WebIDBFactoryImpl::open):
* src/WebIDBFactoryImpl.h: Added.
* src/WebIndexedDatabaseImpl.cpp: Removed.
* src/WebIndexedDatabaseImpl.h: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index f6aad0d..cbd7b23 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -366,12 +366,12 @@ GEN := \
$(intermediates)/storage/JSIDBDatabaseRequest.h \
$(intermediates)/storage/JSIDBErrorEvent.h \
$(intermediates)/storage/JSIDBEvent.h \
+ $(intermediates)/storage/JSIDBFactory.h \
$(intermediates)/storage/JSIDBIndexRequest.h \
$(intermediates)/storage/JSIDBKey.h \
$(intermediates)/storage/JSIDBKeyRange.h \
$(intermediates)/storage/JSIDBRequest.h \
- $(intermediates)/storage/JSIDBSuccessEvent.h \
- $(intermediates)/storage/JSIndexedDatabaseRequest.h
+ $(intermediates)/storage/JSIDBSuccessEvent.h
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
$(GEN): PRIVATE_CUSTOM_TOOL = perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include dom --include html --include storage --outputdir $(dir $@) $<
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index cfa8dc9..4d382cf 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -347,12 +347,12 @@ GEN := \
$(intermediates)/bindings/V8IDBDatabaseRequest.h \
$(intermediates)/bindings/V8IDBErrorEvent.h \
$(intermediates)/bindings/V8IDBEvent.h \
+ $(intermediates)/bindings/V8IDBFactory.h \
$(intermediates)/bindings/V8IDBIndexRequest.h \
$(intermediates)/bindings/V8IDBKey.h \
$(intermediates)/bindings/V8IDBKeyRange.h \
$(intermediates)/bindings/V8IDBRequest.h \
- $(intermediates)/bindings/V8IDBSuccessEvent.h \
- $(intermediates)/bindings/V8IndexedDatabaseRequest.h
+ $(intermediates)/bindings/V8IDBSuccessEvent.h
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
$(GEN): PRIVATE_CUSTOM_TOOL = SOURCE_ROOT=$(PRIVATE_PATH) perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator V8 --include dom --include html --include storage --outputdir $(dir $@) $<
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index ce10769..e48ff2c 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -753,9 +753,9 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
storage/IDBObjectStoreRequest.cpp \
storage/IDBRequest.cpp \
storage/IDBSuccessEvent.cpp \
- storage/IndexedDatabase.cpp \
- storage/IndexedDatabaseImpl.cpp \
- storage/IndexedDatabaseRequest.cpp
+ storage/IDBFactory.cpp \
+ storage/IDBFactoryBackendInterface.cpp \
+ storage/IDBFactoryBackendImpl.cpp \
storage/LocalStorageTask.cpp \
storage/LocalStorageThread.cpp \
storage/OriginQuotaManager.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 69a21d8..bf91cf8 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -338,13 +338,13 @@ SET(WebCore_IDL_FILES
storage/IDBDatabaseRequest.idl
storage/IDBErrorEvent.idl
storage/IDBEvent.idl
+ storage/IDBFactory.idl
storage/IDBIndexRequest.idl
storage/IDBKey.idl
storage/IDBKeyRange.idl
storage/IDBObjectStoreRequest.idl
storage/IDBRequest.idl
storage/IDBSuccessEvent.idl
- storage/IndexedDatabaseRequest.idl
storage/SQLError.idl
storage/SQLException.idl
storage/SQLResultSet.idl
@@ -1443,9 +1443,9 @@ SET(WebCore_SOURCES
storage/IDBObjectStoreImpl.cpp
storage/IDBObjectStoreRequest.cpp
storage/IDBSuccessEvent.cpp
- storage/IndexedDatabase.cpp
- storage/IndexedDatabaseImpl.cpp
- storage/IndexedDatabaseRequest.cpp
+ storage/IDBFactory.cpp
+ storage/IDBFactoryBackendInterface.cpp
+ storage/IDBFactoryBackendImpl.cpp
storage/LocalStorageTask.cpp
storage/LocalStorageThread.cpp
storage/OriginQuotaManager.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a8ceae9..e7e067f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,86 @@
+2010-07-26 Andrei Popescu <andreip at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [IndexedDB] IndexedDatabase should be called IDBFactory.
+ https://bugs.webkit.org/show_bug.cgi?id=42967
+
+ Rename IndexedDatabase to IDBFactory to match the specification.
+
+ Also implement the following new naming convention:
+ IDBFoo IDL interfaces are implemented using IDBFoo C++ classes.
+ IDBFoo objects have pointers to IDBFooBackendInterface objects.
+ IDBFooBackendInterface is implemented by IDBFooBackendImpl and
+ IDBFooBackendProxy (for Chromium).
+
+ No new tests needed, just renaming.
+
+ * Android.derived.jscbindings.mk:
+ * Android.derived.v8bindings.mk:
+ * Android.mk:
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSIDBAnyCustom.cpp:
+ (WebCore::toJS):
+ * bindings/v8/custom/V8IDBAnyCustom.cpp:
+ (WebCore::toV8):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::clear):
+ (WebCore::DOMWindow::indexedDB):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::idbFactory):
+ * page/PageGroup.h:
+ * platform/chromium/ChromiumBridge.h:
+ * storage/IDBAny.cpp:
+ (WebCore::IDBAny::idbFactory):
+ (WebCore::IDBAny::set):
+ * storage/IDBAny.h:
+ (WebCore::IDBAny::):
+ * storage/IDBDatabaseRequest.cpp:
+ * storage/IDBFactory.cpp: Added.
+ (WebCore::IDBFactory::IDBFactory):
+ (WebCore::IDBFactory::~IDBFactory):
+ (WebCore::IDBFactory::open):
+ * storage/IDBFactory.h: Added.
+ (WebCore::IDBFactory::create):
+ * storage/IDBFactory.idl: Added.
+ * storage/IDBFactoryBackendInterface.cpp: Added.
+ (WebCore::IDBFactoryBackendInterface::create):
+ * storage/IDBFactoryBackendInterface.h: Added.
+ (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
+ * storage/IDBFactoryBackendImpl.cpp: Added.
+ (WebCore::IDBFactoryBackendImpl::create):
+ (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
+ (WebCore::IDBFactoryBackendImpl::~IDBFactoryBackendImpl):
+ (WebCore::IDBFactoryBackendImpl::open):
+ * storage/IDBFactoryBackendImpl.h: Added.
+ * storage/IDBKeyRange.cpp:
+ (WebCore::IDBKeyRange::only):
+ (WebCore::IDBKeyRange::leftBound):
+ (WebCore::IDBKeyRange::rightBound):
+ (WebCore::IDBKeyRange::bound):
+ * storage/IDBKeyRange.h:
+ * storage/IDBKeyRange.idl:
+ * storage/IndexedDatabase.cpp: Removed.
+ * storage/IndexedDatabase.h: Removed.
+ * storage/IndexedDatabaseImpl.cpp: Removed.
+ * storage/IndexedDatabaseImpl.h: Removed.
+ * storage/IndexedDatabaseRequest.cpp: Removed.
+ * storage/IndexedDatabaseRequest.h: Removed.
+ * storage/IndexedDatabaseRequest.idl: Removed.
+ * storage/chromium/IDBFactoryBackendInterface.cpp: Added.
+ (WebCore::IDBFactoryBackendInterface::create):
+ * storage/chromium/IndexedDatabase.cpp: Removed.
+
2010-07-29 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index ea6e47e..4f29447 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -181,6 +181,7 @@
#include "JSIDBDatabaseRequest.cpp"
#include "JSIDBErrorEvent.cpp"
#include "JSIDBEvent.cpp"
+#include "JSIDBFactory.cpp"
#include "JSIDBIndexRequest.cpp"
#include "JSIDBKey.cpp"
#include "JSIDBKeyRange.cpp"
@@ -188,7 +189,6 @@
#include "JSIDBRequest.cpp"
#include "JSIDBSuccessEvent.cpp"
#include "JSImageData.cpp"
-#include "JSIndexedDatabaseRequest.cpp"
#include "JSInjectedScriptHost.cpp"
#include "JSInspectorFrontendHost.cpp"
#include "JSJavaScriptCallFrame.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 3b0f38d..d7c2a87 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -224,6 +224,7 @@ DOM_CLASSES = \
IDBDatabaseRequest \
IDBErrorEvent \
IDBEvent \
+ IDBFactory \
IDBIndexRequest \
IDBKey \
IDBKeyRange \
@@ -231,7 +232,6 @@ DOM_CLASSES = \
IDBRequest \
IDBSuccessEvent \
ImageData \
- IndexedDatabaseRequest \
InjectedScriptHost \
InspectorFrontendHost \
KeyboardEvent \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 8389ed6..2c72483 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2832,6 +2832,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSIDBErrorEvent.h \
DerivedSources/WebCore/JSIDBEvent.cpp \
DerivedSources/WebCore/JSIDBEvent.h \
+ DerivedSources/WebCore/JSIDBFactory.cpp \
+ DerivedSources/WebCore/JSIDBFactory.h \
DerivedSources/WebCore/JSIDBIndexRequest.cpp \
DerivedSources/WebCore/JSIDBIndexRequest.h \
DerivedSources/WebCore/JSIDBKeyRange.cpp \
@@ -2841,9 +2843,7 @@ webcore_built_sources += \
DerivedSources/WebCore/JSIDBRequest.cpp \
DerivedSources/WebCore/JSIDBRequest.h \
DerivedSources/WebCore/JSIDBSuccessEvent.cpp \
- DerivedSources/WebCore/JSIDBSuccessEvent.h \
- DerivedSources/WebCore/JSIndexedDatabaseRequest.cpp \
- DerivedSources/WebCore/JSIndexedDatabaseRequest.h
+ DerivedSources/WebCore/JSIDBSuccessEvent.h
webcore_sources += \
WebCore/storage/IDBAny.cpp \
@@ -2876,12 +2876,12 @@ webcore_sources += \
WebCore/storage/IDBRequest.h \
WebCore/storage/IDBSuccessEvent.cpp \
WebCore/storage/IDBSuccessEvent.h \
- WebCore/storage/IndexedDatabase.cpp \
- WebCore/storage/IndexedDatabase.h \
- WebCore/storage/IndexedDatabaseImpl.cpp \
- WebCore/storage/IndexedDatabaseImpl.h \
- WebCore/storage/IndexedDatabaseRequest.cpp \
- WebCore/storage/IndexedDatabaseRequest.h
+ WebCore/storage/IDBFactory.cpp \
+ WebCore/storage/IDBFactory.h \
+ WebCore/storage/IDBFactoryBackendInterface.cpp \
+ WebCore/storage/IDBFactoryBackendInterface.h \
+ WebCore/storage/IDBFactoryBackendImpl.cpp \
+ WebCore/storage/IDBFactoryBackendImpl.h
endif # END ENABLE_INDEXED_DATABASE
# ----
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index abd49e7..5ecb48a 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -841,8 +841,8 @@
# Don't build StorageEventDispatcher. We have our own implementation.
'../storage/StorageEventDispatcher.cpp',
- # Don't build IndexedDatabase. We have our own implementation.
- '../storage/IndexedDatabase.cpp',
+ # Don't build IDBFactoryBackendInterface. We have our own implementation.
+ '../storage/IDBFactoryBackendInterface.cpp',
# Use history/BackForwardListChromium.cpp instead.
'../history/BackForwardListImpl.cpp',
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 698e302..5e1f650 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -236,13 +236,13 @@
'storage/IDBDatabaseRequest.idl',
'storage/IDBErrorEvent.idl',
'storage/IDBEvent.idl',
+ 'storage/IDBFactory.idl',
'storage/IDBIndexRequest.idl',
'storage/IDBKey.idl',
'storage/IDBKeyRange.idl',
'storage/IDBObjectStoreRequest.idl',
'storage/IDBRequest.idl',
'storage/IDBSuccessEvent.idl',
- 'storage/IndexedDatabaseRequest.idl',
'storage/SQLError.idl',
'storage/SQLException.idl',
'storage/SQLResultSet.idl',
@@ -3448,7 +3448,7 @@
'storage/ChangeVersionWrapper.cpp',
'storage/ChangeVersionWrapper.h',
'storage/chromium/DatabaseObserver.h',
- 'storage/chromium/IndexedDatabase.cpp',
+ 'storage/chromium/IDBFactoryBackendInterface.cpp',
'storage/chromium/DatabaseTrackerChromium.cpp',
'storage/chromium/QuotaTracker.cpp',
'storage/chromium/QuotaTracker.h',
@@ -3482,6 +3482,12 @@
'storage/IDBEvent.h',
'storage/IDBErrorEvent.cpp',
'storage/IDBErrorEvent.h',
+ 'storage/IDBFactory.cpp',
+ 'storage/IDBFactory.h',
+ 'storage/IDBFactoryBackendInterface.cpp',
+ 'storage/IDBFactoryBackendInterface.h',
+ 'storage/IDBFactoryBackendImpl.cpp',
+ 'storage/IDBFactoryBackendImpl.h',
'storage/IDBIndex.h',
'storage/IDBIndexImpl.cpp',
'storage/IDBIndexImpl.h',
@@ -3501,12 +3507,6 @@
'storage/IDBRequest.h',
'storage/IDBSuccessEvent.cpp',
'storage/IDBSuccessEvent.h',
- 'storage/IndexedDatabase.cpp',
- 'storage/IndexedDatabase.h',
- 'storage/IndexedDatabaseImpl.cpp',
- 'storage/IndexedDatabaseImpl.h',
- 'storage/IndexedDatabaseRequest.cpp',
- 'storage/IndexedDatabaseRequest.h',
'storage/LocalStorageTask.cpp',
'storage/LocalStorageTask.h',
'storage/LocalStorageThread.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index ef87a45..ce437ba 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -494,7 +494,7 @@ IDL_BINDINGS += \
storage/IDBObjectStoreRequest.idl \
storage/IDBRequest.idl \
storage/IDBSuccessEvent.idl \
- storage/IndexedDatabaseRequest.idl \
+ storage/IDBFactory.idl \
storage/Storage.idl \
storage/StorageEvent.idl \
storage/SQLError.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index b7f152e..565b4aa 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2425,6 +2425,9 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
storage/IDBDatabaseRequest.h \
storage/IDBErrorEvent.h \
storage/IDBEvent.h \
+ storage/IDBFactory.h \
+ storage/IDBFactoryBackendInterface.h \
+ storage/IDBFactoryBackendImpl.h \
storage/IDBIndex.h \
storage/IDBIndexImpl.h \
storage/IDBIndexRequest.h \
@@ -2434,10 +2437,7 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
storage/IDBObjectStoreImpl.h \
storage/IDBObjectStoreRequest.h \
storage/IDBRequest.h \
- storage/IDBSuccessEvent.h \
- storage/IndexedDatabase.h \
- storage/IndexedDatabaseImpl.h \
- storage/IndexedDatabaseRequest.h
+ storage/IDBSuccessEvent.h
SOURCES += \
bindings/js/IDBBindingUtilities.cpp \
@@ -2448,6 +2448,9 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
storage/IDBDatabaseRequest.cpp \
storage/IDBErrorEvent.cpp \
storage/IDBEvent.cpp \
+ storage/IDBFactory.cpp \
+ storage/IDBFactoryBackendInterface.cpp \
+ storage/IDBFactoryBackendImpl.cpp \
storage/IDBIndexImpl.cpp \
storage/IDBIndexRequest.cpp \
storage/IDBKey.cpp \
@@ -2455,10 +2458,7 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
storage/IDBObjectStoreImpl.cpp \
storage/IDBObjectStoreRequest.cpp \
storage/IDBRequest.cpp \
- storage/IDBSuccessEvent.cpp \
- storage/IndexedDatabase.cpp \
- storage/IndexedDatabaseImpl.cpp \
- storage/IndexedDatabaseRequest.cpp
+ storage/IDBSuccessEvent.cpp
}
contains(DEFINES, ENABLE_DOM_STORAGE=1) {
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 167ba8c..c2aff4a 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -45296,7 +45296,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaserequest.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBFactory.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45348,7 +45348,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaseRequest.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBFactory.h"
>
</File>
<File
@@ -50208,28 +50208,28 @@
RelativePath="..\storage\IDBSuccessEvent.h"
>
</File>
+ <File
+ RelativePath="..\storage\IDBFactory.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\storage\IDBFactory.h"
+ >
+ </File>
<File
- RelativePath="..\storage\IndexedDatabase.cpp"
+ RelativePath="..\storage\IDBFactoryBackendInterface.cpp"
>
</File>
<File
- RelativePath="..\storage\IndexedDatabase.h"
+ RelativePath="..\storage\IDBFactoryBackendInterface.h"
>
</File>
<File
- RelativePath="..\storage\IndexedDatabaseImpl.cpp"
+ RelativePath="..\storage\IDBFactoryBackendImpl.cpp"
>
</File>
<File
- RelativePath="..\storage\IndexedDatabaseImpl.h"
- >
- </File>
- <File
- RelativePath="..\storage\IndexedDatabaseRequest.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\IndexedDatabaseRequest.h"
+ RelativePath="..\storage\IDBFactoryBackendImpl.h"
>
</File>
<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 7af6387..c62322d 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -4941,8 +4941,8 @@
C585A69111D4FB08004C3E4B /* JSIDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A67911D4FB07004C3E4B /* JSIDBRequest.h */; };
C585A69211D4FB08004C3E4B /* JSIDBSuccessEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A67A11D4FB07004C3E4B /* JSIDBSuccessEvent.cpp */; };
C585A69311D4FB08004C3E4B /* JSIDBSuccessEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A67B11D4FB07004C3E4B /* JSIDBSuccessEvent.h */; };
- C585A69611D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A69411D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp */; };
- C585A69711D4FB13004C3E4B /* JSIndexedDatabaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A69511D4FB13004C3E4B /* JSIndexedDatabaseRequest.h */; };
+ C585A69611D4FB13004C3E4B /* JSIDBFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A69411D4FB13004C3E4B /* JSIDBFactory.cpp */; };
+ C585A69711D4FB13004C3E4B /* JSIDBFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A69511D4FB13004C3E4B /* JSIDBFactory.h */; };
C585A6CC11D4FB3D004C3E4B /* IDBAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A69811D4FB3D004C3E4B /* IDBAny.cpp */; };
C585A6CD11D4FB3D004C3E4B /* IDBAny.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A69911D4FB3D004C3E4B /* IDBAny.h */; };
C585A6CF11D4FB3D004C3E4B /* IDBCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A69B11D4FB3D004C3E4B /* IDBCallbacks.h */; };
@@ -4976,12 +4976,12 @@
C585A6F411D4FB3D004C3E4B /* IDBRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C011D4FB3D004C3E4B /* IDBRequest.h */; };
C585A6F611D4FB3D004C3E4B /* IDBSuccessEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C211D4FB3D004C3E4B /* IDBSuccessEvent.cpp */; };
C585A6F711D4FB3D004C3E4B /* IDBSuccessEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C311D4FB3D004C3E4B /* IDBSuccessEvent.h */; };
- C585A6F911D4FB3D004C3E4B /* IndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C511D4FB3D004C3E4B /* IndexedDatabase.cpp */; };
- C585A6FA11D4FB3D004C3E4B /* IndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C611D4FB3D004C3E4B /* IndexedDatabase.h */; };
- C585A6FB11D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C711D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp */; };
- C585A6FC11D4FB3D004C3E4B /* IndexedDatabaseImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C811D4FB3D004C3E4B /* IndexedDatabaseImpl.h */; };
- C585A6FD11D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C911D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp */; };
- C585A6FE11D4FB3D004C3E4B /* IndexedDatabaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6CA11D4FB3D004C3E4B /* IndexedDatabaseRequest.h */; };
+ C585A6F911D4FB3D004C3E4B /* IDBFactoryBackendInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C511D4FB3D004C3E4B /* IDBFactoryBackendInterface.cpp */; };
+ C585A6FA11D4FB3D004C3E4B /* IDBFactoryBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C611D4FB3D004C3E4B /* IDBFactoryBackendInterface.h */; };
+ C585A6FB11D4FB3D004C3E4B /* IDBFactoryBackendImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C711D4FB3D004C3E4B /* IDBFactoryBackendImpl.cpp */; };
+ C585A6FC11D4FB3D004C3E4B /* IDBFactoryBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6C811D4FB3D004C3E4B /* IDBFactoryBackendImpl.h */; };
+ C585A6FD11D4FB3D004C3E4B /* IDBFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C585A6C911D4FB3D004C3E4B /* IDBFactory.cpp */; };
+ C585A6FE11D4FB3D004C3E4B /* IDBFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = C585A6CA11D4FB3D004C3E4B /* IDBFactory.h */; };
C5D4AA7A116BAFB60069CA93 /* GlyphMetricsMap.h in Headers */ = {isa = PBXBuildFile; fileRef = C5D4AA78116BAFB60069CA93 /* GlyphMetricsMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
C5E9B67710697E1300C7BB1A /* StorageEventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5E9B67610697E1300C7BB1A /* StorageEventDispatcher.cpp */; };
C5EBDD84105EDDEC0056816F /* StorageEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */; };
@@ -10602,8 +10602,8 @@
C585A67911D4FB07004C3E4B /* JSIDBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBRequest.h; sourceTree = "<group>"; };
C585A67A11D4FB07004C3E4B /* JSIDBSuccessEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBSuccessEvent.cpp; sourceTree = "<group>"; };
C585A67B11D4FB07004C3E4B /* JSIDBSuccessEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBSuccessEvent.h; sourceTree = "<group>"; };
- C585A69411D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIndexedDatabaseRequest.cpp; sourceTree = "<group>"; };
- C585A69511D4FB13004C3E4B /* JSIndexedDatabaseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIndexedDatabaseRequest.h; sourceTree = "<group>"; };
+ C585A69411D4FB13004C3E4B /* JSIDBFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBFactory.cpp; sourceTree = "<group>"; };
+ C585A69511D4FB13004C3E4B /* JSIDBFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBFactory.h; sourceTree = "<group>"; };
C585A69811D4FB3D004C3E4B /* IDBAny.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBAny.cpp; sourceTree = "<group>"; };
C585A69911D4FB3D004C3E4B /* IDBAny.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBAny.h; sourceTree = "<group>"; };
C585A69A11D4FB3D004C3E4B /* IDBAny.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBAny.idl; sourceTree = "<group>"; };
@@ -10649,13 +10649,13 @@
C585A6C211D4FB3D004C3E4B /* IDBSuccessEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBSuccessEvent.cpp; sourceTree = "<group>"; };
C585A6C311D4FB3D004C3E4B /* IDBSuccessEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBSuccessEvent.h; sourceTree = "<group>"; };
C585A6C411D4FB3D004C3E4B /* IDBSuccessEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBSuccessEvent.idl; sourceTree = "<group>"; };
- C585A6C511D4FB3D004C3E4B /* IndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexedDatabase.cpp; sourceTree = "<group>"; };
- C585A6C611D4FB3D004C3E4B /* IndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedDatabase.h; sourceTree = "<group>"; };
- C585A6C711D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexedDatabaseImpl.cpp; sourceTree = "<group>"; };
- C585A6C811D4FB3D004C3E4B /* IndexedDatabaseImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedDatabaseImpl.h; sourceTree = "<group>"; };
- C585A6C911D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexedDatabaseRequest.cpp; sourceTree = "<group>"; };
- C585A6CA11D4FB3D004C3E4B /* IndexedDatabaseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedDatabaseRequest.h; sourceTree = "<group>"; };
- C585A6CB11D4FB3D004C3E4B /* IndexedDatabaseRequest.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IndexedDatabaseRequest.idl; sourceTree = "<group>"; };
+ C585A6C511D4FB3D004C3E4B /* IDBFactoryBackendInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactoryBackendInterface.cpp; sourceTree = "<group>"; };
+ C585A6C611D4FB3D004C3E4B /* IDBFactoryBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryBackendInterface.h; sourceTree = "<group>"; };
+ C585A6C711D4FB3D004C3E4B /* IDBFactoryBackendImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactoryBackendImpl.cpp; sourceTree = "<group>"; };
+ C585A6C811D4FB3D004C3E4B /* IDBFactoryBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactoryBackendImpl.h; sourceTree = "<group>"; };
+ C585A6C911D4FB3D004C3E4B /* IDBFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBFactory.cpp; sourceTree = "<group>"; };
+ C585A6CA11D4FB3D004C3E4B /* IDBFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBFactory.h; sourceTree = "<group>"; };
+ C585A6CB11D4FB3D004C3E4B /* IDBFactory.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBFactory.idl; sourceTree = "<group>"; };
C5D4AA78116BAFB60069CA93 /* GlyphMetricsMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlyphMetricsMap.h; sourceTree = "<group>"; };
C5E9B67610697E1300C7BB1A /* StorageEventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageEventDispatcher.cpp; sourceTree = "<group>"; };
C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageEventDispatcher.h; sourceTree = "<group>"; };
@@ -11360,13 +11360,13 @@
C585A6C211D4FB3D004C3E4B /* IDBSuccessEvent.cpp */,
C585A6C311D4FB3D004C3E4B /* IDBSuccessEvent.h */,
C585A6C411D4FB3D004C3E4B /* IDBSuccessEvent.idl */,
- C585A6C511D4FB3D004C3E4B /* IndexedDatabase.cpp */,
- C585A6C611D4FB3D004C3E4B /* IndexedDatabase.h */,
- C585A6C711D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp */,
- C585A6C811D4FB3D004C3E4B /* IndexedDatabaseImpl.h */,
- C585A6C911D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp */,
- C585A6CA11D4FB3D004C3E4B /* IndexedDatabaseRequest.h */,
- C585A6CB11D4FB3D004C3E4B /* IndexedDatabaseRequest.idl */,
+ C585A6C511D4FB3D004C3E4B /* IDBFactoryBackendInterface.cpp */,
+ C585A6C611D4FB3D004C3E4B /* IDBFactoryBackendInterface.h */,
+ C585A6C711D4FB3D004C3E4B /* IDBFactoryBackendImpl.cpp */,
+ C585A6C811D4FB3D004C3E4B /* IDBFactoryBackendImpl.h */,
+ C585A6C911D4FB3D004C3E4B /* IDBFactory.cpp */,
+ C585A6CA11D4FB3D004C3E4B /* IDBFactory.h */,
+ C585A6CB11D4FB3D004C3E4B /* IDBFactory.idl */,
511F23130DC160DA004F0032 /* LocalStorageTask.cpp */,
511F23140DC160DA004F0032 /* LocalStorageTask.h */,
511F23150DC160DA004F0032 /* LocalStorageThread.cpp */,
@@ -14781,8 +14781,8 @@
C585A67911D4FB07004C3E4B /* JSIDBRequest.h */,
C585A67A11D4FB07004C3E4B /* JSIDBSuccessEvent.cpp */,
C585A67B11D4FB07004C3E4B /* JSIDBSuccessEvent.h */,
- C585A69411D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp */,
- C585A69511D4FB13004C3E4B /* JSIndexedDatabaseRequest.h */,
+ C585A69411D4FB13004C3E4B /* JSIDBFactory.cpp */,
+ C585A69511D4FB13004C3E4B /* JSIDBFactory.h */,
514C76350CE9225E007EF3CD /* JSSQLError.cpp */,
BC8243250D0CE8A200460C8F /* JSSQLError.h */,
B525A96411CA2340003A23A8 /* JSSQLException.cpp */,
@@ -18514,9 +18514,9 @@
4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */,
316FE1180E6E1DA700BF6088 /* ImplicitAnimation.h in Headers */,
DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */,
- C585A6FA11D4FB3D004C3E4B /* IndexedDatabase.h in Headers */,
- C585A6FC11D4FB3D004C3E4B /* IndexedDatabaseImpl.h in Headers */,
- C585A6FE11D4FB3D004C3E4B /* IndexedDatabaseRequest.h in Headers */,
+ C585A6FA11D4FB3D004C3E4B /* IDBFactoryBackendInterface.h in Headers */,
+ C585A6FC11D4FB3D004C3E4B /* IDBFactoryBackendImpl.h in Headers */,
+ C585A6FE11D4FB3D004C3E4B /* IDBFactory.h in Headers */,
F3644B001119805900E0D537 /* InjectedScript.h in Headers */,
7A0E76FA10BF08ED00A0276E /* InjectedScriptHost.h in Headers */,
A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */,
@@ -18749,7 +18749,7 @@
C585A69311D4FB08004C3E4B /* JSIDBSuccessEvent.h in Headers */,
BC6C49F40D7DBA0500FFA558 /* JSImageConstructor.h in Headers */,
A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
- C585A69711D4FB13004C3E4B /* JSIndexedDatabaseRequest.h in Headers */,
+ C585A69711D4FB13004C3E4B /* JSIDBFactory.h in Headers */,
7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */,
7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
49EECF07105070C400099FAB /* JSInt16Array.h in Headers */,
@@ -20932,9 +20932,9 @@
4B3480930EEF50D400AC1B41 /* ImageSourceCGMac.mm in Sources */,
316FE1170E6E1DA700BF6088 /* ImplicitAnimation.cpp in Sources */,
DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */,
- C585A6F911D4FB3D004C3E4B /* IndexedDatabase.cpp in Sources */,
- C585A6FB11D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp in Sources */,
- C585A6FD11D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp in Sources */,
+ C585A6F911D4FB3D004C3E4B /* IDBFactoryBackendInterface.cpp in Sources */,
+ C585A6FB11D4FB3D004C3E4B /* IDBFactoryBackendImpl.cpp in Sources */,
+ C585A6FD11D4FB3D004C3E4B /* IDBFactory.cpp in Sources */,
F3644AFF1119805900E0D537 /* InjectedScript.cpp in Sources */,
7A0E76F910BF08ED00A0276E /* InjectedScriptHost.cpp in Sources */,
A8CFF5E60A155A05000A4234 /* InlineBox.cpp in Sources */,
@@ -21214,7 +21214,7 @@
BC6C49F30D7DBA0500FFA558 /* JSImageConstructor.cpp in Sources */,
A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
- C585A69611D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp in Sources */,
+ C585A69611D4FB13004C3E4B /* JSIDBFactory.cpp in Sources */,
7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */,
7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */,
7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */,
diff --git a/WebCore/bindings/js/JSIDBAnyCustom.cpp b/WebCore/bindings/js/JSIDBAnyCustom.cpp
index b7c845e..b2058cc 100644
--- a/WebCore/bindings/js/JSIDBAnyCustom.cpp
+++ b/WebCore/bindings/js/JSIDBAnyCustom.cpp
@@ -33,15 +33,15 @@
#include "IDBAny.h"
#include "IDBDatabaseRequest.h"
+#include "IDBFactory.h"
#include "IDBIndexRequest.h"
#include "IDBKey.h"
#include "IDBObjectStoreRequest.h"
-#include "IndexedDatabaseRequest.h"
#include "JSIDBDatabaseRequest.h"
+#include "JSIDBFactory.h"
#include "JSIDBIndexRequest.h"
#include "JSIDBKey.h"
#include "JSIDBObjectStoreRequest.h"
-#include "JSIndexedDatabaseRequest.h"
#include "SerializedScriptValue.h"
using namespace JSC;
@@ -66,8 +66,8 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, IDBAny* idbAny)
return toJS(exec, globalObject, idbAny->idbKey());
case IDBAny::IDBObjectStoreRequestType:
return toJS(exec, globalObject, idbAny->idbObjectStoreRequest());
- case IDBAny::IndexedDatabaseRequestType:
- return toJS(exec, globalObject, idbAny->indexedDatabaseRequest());
+ case IDBAny::IDBFactoryType:
+ return toJS(exec, globalObject, idbAny->idbFactory());
case IDBAny::SerializedScriptValueType:
return idbAny->serializedScriptValue()->deserialize(exec, globalObject);
}
diff --git a/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp b/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
index def1120..b96f8ef 100644
--- a/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
@@ -33,10 +33,10 @@
#include "SerializedScriptValue.h"
#include "V8IDBDatabaseRequest.h"
+#include "V8IDBFactory.h"
#include "V8IDBIndexRequest.h"
#include "V8IDBKey.h"
#include "V8IDBObjectStoreRequest.h"
-#include "V8IndexedDatabaseRequest.h"
namespace WebCore {
@@ -58,8 +58,8 @@ v8::Handle<v8::Value> toV8(IDBAny* impl)
return toV8(impl->idbKey());
case IDBAny::IDBObjectStoreRequestType:
return toV8(impl->idbObjectStoreRequest());
- case IDBAny::IndexedDatabaseRequestType:
- return toV8(impl->indexedDatabaseRequest());
+ case IDBAny::IDBFactoryType:
+ return toV8(impl->idbFactory());
case IDBAny::SerializedScriptValueType:
return impl->serializedScriptValue()->deserialize();
}
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index e6d8d04..fc696da 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -38,6 +38,7 @@
#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
#include "DOMSelection.h"
+#include "DOMStringList.h"
#include "DOMTimer.h"
#include "Database.h"
#include "DatabaseCallback.h"
@@ -56,9 +57,9 @@
#include "FrameView.h"
#include "HTMLFrameOwnerElement.h"
#include "History.h"
+#include "IDBFactory.h"
+#include "IDBFactoryBackendInterface.h"
#include "IDBKeyRange.h"
-#include "IndexedDatabase.h"
-#include "IndexedDatabaseRequest.h"
#include "InspectorController.h"
#include "InspectorTimelineAgent.h"
#include "Location.h"
@@ -484,8 +485,8 @@ void DOMWindow::clear()
#endif
#if ENABLE(INDEXED_DATABASE)
- m_idb_key_range = 0;
- m_indexedDatabaseRequest = 0;
+ m_idbFactory = 0;
+ m_idbKeyRange = 0;
#endif
}
@@ -687,10 +688,10 @@ void DOMWindow::pageDestroyed()
}
#if ENABLE(INDEXED_DATABASE)
-IndexedDatabaseRequest* DOMWindow::indexedDB() const
+IDBFactory* DOMWindow::indexedDB() const
{
- if (m_indexedDatabaseRequest)
- return m_indexedDatabaseRequest.get();
+ if (m_idbFactory)
+ return m_idbFactory.get();
Document* document = this->document();
if (!document)
@@ -704,16 +705,16 @@ IndexedDatabaseRequest* DOMWindow::indexedDB() const
// FIXME: See if indexedDatabase access is allowed.
- m_indexedDatabaseRequest = IndexedDatabaseRequest::create(page->group().indexedDatabase());
- return m_indexedDatabaseRequest.get();
+ m_idbFactory = IDBFactory::create(page->group().idbFactory());
+ return m_idbFactory.get();
}
IDBKeyRange* DOMWindow::iDBKeyRange() const
{
- if (!m_idb_key_range)
- m_idb_key_range = IDBKeyRange::create(0, 0, 0);
+ if (!m_idbKeyRange)
+ m_idbKeyRange = IDBKeyRange::create(0, 0, 0);
- return m_idb_key_range.get();
+ return m_idbKeyRange.get();
}
#endif
diff --git a/WebCore/page/DOMWindow.h b/WebCore/page/DOMWindow.h
index 7a13651..51d407c 100644
--- a/WebCore/page/DOMWindow.h
+++ b/WebCore/page/DOMWindow.h
@@ -53,8 +53,8 @@ namespace WebCore {
class FloatRect;
class Frame;
class History;
+ class IDBFactory;
class IDBKeyRange;
- class IndexedDatabaseRequest;
class InspectorTimelineAgent;
class Location;
class StyleMedia;
@@ -232,8 +232,8 @@ namespace WebCore {
void pageDestroyed();
#if ENABLE(INDEXED_DATABASE)
+ IDBFactory* indexedDB() const;
IDBKeyRange* iDBKeyRange() const;
- IndexedDatabaseRequest* indexedDB() const;
#endif
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
@@ -424,8 +424,8 @@ namespace WebCore {
mutable RefPtr<NotificationCenter> m_notifications;
#endif
#if ENABLE(INDEXED_DATABASE)
- mutable RefPtr<IDBKeyRange> m_idb_key_range;
- mutable RefPtr<IndexedDatabaseRequest> m_indexedDatabaseRequest;
+ mutable RefPtr<IDBFactory> m_idbFactory;
+ mutable RefPtr<IDBKeyRange> m_idbKeyRange;
#endif
EventTargetData m_eventTargetData;
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 6b0c15d..b352202 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -173,7 +173,7 @@ module window {
readonly attribute [EnabledAtRuntime] NotificationCenter webkitNotifications;
#endif
#if defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE
- readonly attribute [EnabledAtRuntime] IndexedDatabaseRequest indexedDB;
+ readonly attribute [EnabledAtRuntime] IDBFactory indexedDB;
readonly attribute [EnabledAtRuntime] IDBKeyRange IDBKeyRange;
#endif
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index e0502c5..9d278ca 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -30,7 +30,7 @@
#include "ChromeClient.h"
#include "Document.h"
#include "Frame.h"
-#include "IndexedDatabase.h"
+#include "IDBFactoryBackendInterface.h"
#include "Page.h"
#include "Settings.h"
#include "StorageNamespace.h"
@@ -203,13 +203,13 @@ StorageNamespace* PageGroup::localStorage()
#endif
#if ENABLE(INDEXED_DATABASE)
-IndexedDatabase* PageGroup::indexedDatabase()
+IDBFactoryBackendInterface* PageGroup::idbFactory()
{
// Do not add page setting based access control here since this object is shared by all pages in
// the group and having per-page controls is misleading.
- if (!m_indexedDatabase)
- m_indexedDatabase = IndexedDatabase::create();
- return m_indexedDatabase.get();
+ if (!m_factoryBackend)
+ m_factoryBackend = IDBFactoryBackendInterface::create();
+ return m_factoryBackend.get();
}
#endif
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index 77aa281..a32595b 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -36,7 +36,7 @@
namespace WebCore {
class KURL;
- class IndexedDatabase;
+ class IDBFactoryBackendInterface;
class Page;
class StorageNamespace;
@@ -71,7 +71,7 @@ namespace WebCore {
bool hasLocalStorage() { return m_localStorage; }
#endif
#if ENABLE(INDEXED_DATABASE)
- IndexedDatabase* indexedDatabase();
+ IDBFactoryBackendInterface* idbFactory();
#endif
void addUserScriptToWorld(DOMWrapperWorld*, const String& source, const KURL&,
@@ -108,7 +108,7 @@ namespace WebCore {
RefPtr<StorageNamespace> m_localStorage;
#endif
#if ENABLE(INDEXED_DATABASE)
- RefPtr<IndexedDatabase> m_indexedDatabase;
+ RefPtr<IDBFactoryBackendInterface> m_factoryBackend;
#endif
OwnPtr<UserScriptMap> m_userScripts;
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index 711c728..acfefe1 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -70,7 +70,7 @@ namespace WebCore {
class GeolocationServiceChromium;
class GraphicsContext;
class Image;
- class IndexedDatabase;
+ class IDBFactoryBackendInterface;
class IntRect;
class KURL;
class String;
@@ -166,7 +166,7 @@ namespace WebCore {
static long long databaseGetFileSize(const String& vfsFileName);
// IndexedDB ----------------------------------------------------------
- static PassRefPtr<IndexedDatabase> indexedDatabase();
+ static PassRefPtr<IDBFactoryBackendInterface> idbFactory();
// JavaScript ---------------------------------------------------------
static void notifyJSOutOfMemory(Frame*);
diff --git a/WebCore/storage/IDBAny.cpp b/WebCore/storage/IDBAny.cpp
index 9a18980..bf22b50 100644
--- a/WebCore/storage/IDBAny.cpp
+++ b/WebCore/storage/IDBAny.cpp
@@ -29,9 +29,9 @@
#if ENABLE(INDEXED_DATABASE)
#include "IDBDatabaseRequest.h"
+#include "IDBFactory.h"
#include "IDBIndexRequest.h"
#include "IDBObjectStoreRequest.h"
-#include "IndexedDatabaseRequest.h"
#include "SerializedScriptValue.h"
namespace WebCore {
@@ -74,10 +74,10 @@ PassRefPtr<IDBObjectStoreRequest> IDBAny::idbObjectStoreRequest()
return m_idbObjectStoreRequest;
}
-PassRefPtr<IndexedDatabaseRequest> IDBAny::indexedDatabaseRequest()
+PassRefPtr<IDBFactory> IDBAny::idbFactory()
{
- ASSERT(m_type == IndexedDatabaseRequestType);
- return m_indexedDatabaseRequest;
+ ASSERT(m_type == IDBFactoryType);
+ return m_idbFactory;
}
PassRefPtr<SerializedScriptValue> IDBAny::serializedScriptValue()
@@ -120,11 +120,11 @@ void IDBAny::set(PassRefPtr<IDBObjectStoreRequest> value)
m_idbObjectStoreRequest = value;
}
-void IDBAny::set(PassRefPtr<IndexedDatabaseRequest> value)
+void IDBAny::set(PassRefPtr<IDBFactory> value)
{
ASSERT(m_type == UndefinedType);
- m_type = IndexedDatabaseRequestType;
- m_indexedDatabaseRequest = value;
+ m_type = IDBFactoryType;
+ m_idbFactory = value;
}
void IDBAny::set(PassRefPtr<SerializedScriptValue> value)
diff --git a/WebCore/storage/IDBAny.h b/WebCore/storage/IDBAny.h
index 77bba7c..c41e523 100644
--- a/WebCore/storage/IDBAny.h
+++ b/WebCore/storage/IDBAny.h
@@ -38,7 +38,7 @@ class IDBDatabaseRequest;
class IDBIndexRequest;
class IDBKey;
class IDBObjectStoreRequest;
-class IndexedDatabaseRequest;
+class IDBFactory;
class SerializedScriptValue;
class IDBAny : public RefCounted<IDBAny> {
@@ -58,9 +58,9 @@ public:
NullType,
IDBDatabaseRequestType,
IDBIndexRequestType,
+ IDBFactoryType,
IDBKeyType,
IDBObjectStoreRequestType,
- IndexedDatabaseRequestType,
SerializedScriptValueType
};
@@ -68,18 +68,18 @@ public:
// Use type() to figure out which one of these you're allowed to call.
PassRefPtr<IDBDatabaseRequest> idbDatabaseRequest();
PassRefPtr<IDBIndexRequest> idbIndexRequest();
+ PassRefPtr<IDBFactory> idbFactory();
PassRefPtr<IDBKey> idbKey();
PassRefPtr<IDBObjectStoreRequest> idbObjectStoreRequest();
- PassRefPtr<IndexedDatabaseRequest> indexedDatabaseRequest();
PassRefPtr<SerializedScriptValue> serializedScriptValue();
// Set can only be called once.
void set(); // For "null".
void set(PassRefPtr<IDBDatabaseRequest>);
void set(PassRefPtr<IDBIndexRequest>);
+ void set(PassRefPtr<IDBFactory>);
void set(PassRefPtr<IDBKey>);
void set(PassRefPtr<IDBObjectStoreRequest>);
- void set(PassRefPtr<IndexedDatabaseRequest>);
void set(PassRefPtr<SerializedScriptValue>);
private:
@@ -90,9 +90,9 @@ private:
// Only one of the following should ever be in use at any given time.
RefPtr<IDBDatabaseRequest> m_idbDatabaseRequest;
RefPtr<IDBIndexRequest> m_idbIndexRequest;
+ RefPtr<IDBFactory> m_idbFactory;
RefPtr<IDBKey> m_idbKey;
RefPtr<IDBObjectStoreRequest> m_idbObjectStoreRequest;
- RefPtr<IndexedDatabaseRequest> m_indexedDatabaseRequest;
RefPtr<SerializedScriptValue> m_serializedScriptValue;
};
diff --git a/WebCore/storage/IDBDatabaseRequest.cpp b/WebCore/storage/IDBDatabaseRequest.cpp
index fce2671..8a40e9e 100644
--- a/WebCore/storage/IDBDatabaseRequest.cpp
+++ b/WebCore/storage/IDBDatabaseRequest.cpp
@@ -27,9 +27,9 @@
#include "IDBDatabaseRequest.h"
#include "IDBAny.h"
+#include "IDBFactoryBackendInterface.h"
#include "IDBObjectStoreRequest.h"
#include "IDBRequest.h"
-#include "IndexedDatabase.h"
#include "ScriptExecutionContext.h"
#if ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBFactory.cpp b/WebCore/storage/IDBFactory.cpp
new file mode 100644
index 0000000..d3a83a5
--- /dev/null
+++ b/WebCore/storage/IDBFactory.cpp
@@ -0,0 +1,74 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IDBFactory.h"
+
+#include "DOMStringList.h"
+#include "Document.h"
+#include "ExceptionCode.h"
+#include "Frame.h"
+#include "IDBDatabase.h"
+#include "IDBFactoryBackendInterface.h"
+#include "IDBKeyRange.h"
+#include "IDBRequest.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+IDBFactory::IDBFactory(IDBFactoryBackendInterface* factory)
+ : m_factoryBackend(factory)
+{
+ // We pass a reference to this object before it can be adopted.
+ relaxAdoptionRequirement();
+}
+
+IDBFactory::~IDBFactory()
+{
+}
+
+PassRefPtr<IDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, const String& description)
+{
+ if (!context->isDocument()) {
+ // FIXME: make this work with workers.
+ return 0;
+ }
+
+ Document* document = static_cast<Document*>(context);
+ if (!document->frame())
+ return 0;
+
+ RefPtr<IDBRequest> request = IDBRequest::create(document, IDBAny::create(this));
+ m_factoryBackend->open(name, description, request, document->securityOrigin(), document->frame());
+ return request;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBFactory.h b/WebCore/storage/IDBFactory.h
new file mode 100644
index 0000000..61619b9
--- /dev/null
+++ b/WebCore/storage/IDBFactory.h
@@ -0,0 +1,70 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IDBFactory_h
+#define IDBFactory_h
+
+#include "DOMStringList.h"
+#include "ExceptionCode.h"
+#include "IDBFactoryBackendInterface.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBKey;
+class IDBKeyRange;
+class IDBRequest;
+class IDBFactoryBackendInterface;
+class ScriptExecutionContext;
+
+class IDBFactory : public RefCounted<IDBFactory> {
+public:
+ static PassRefPtr<IDBFactory> create(IDBFactoryBackendInterface* factory)
+ {
+ return adoptRef(new IDBFactory(factory));
+ }
+ ~IDBFactory();
+
+ PassRefPtr<IDBRequest> open(ScriptExecutionContext*, const String& name, const String& description);
+
+private:
+ IDBFactory(IDBFactoryBackendInterface*);
+
+ RefPtr<IDBFactoryBackendInterface> m_factoryBackend;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBFactory_h
+
diff --git a/WebCore/storage/IDBFactory.idl b/WebCore/storage/IDBFactory.idl
new file mode 100644
index 0000000..cd887f0
--- /dev/null
+++ b/WebCore/storage/IDBFactory.idl
@@ -0,0 +1,34 @@
+/*
+ * 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:
+ *
+ * 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 AND ITS 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 APPLE OR ITS 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.
+ */
+
+module storage {
+
+ interface [
+ Conditional=INDEXED_DATABASE
+ ] IDBFactory {
+ [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name, in DOMString description);
+ };
+
+}
diff --git a/WebCore/storage/IDBFactoryBackendImpl.cpp b/WebCore/storage/IDBFactoryBackendImpl.cpp
new file mode 100644
index 0000000..e965c3f
--- /dev/null
+++ b/WebCore/storage/IDBFactoryBackendImpl.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IDBFactoryBackendImpl.h"
+
+#include "DOMStringList.h"
+#include "IDBDatabaseImpl.h"
+#include "SecurityOrigin.h"
+#include <wtf/Threading.h>
+#include <wtf/UnusedParam.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBFactoryBackendImpl> IDBFactoryBackendImpl::create()
+{
+ return adoptRef(new IDBFactoryBackendImpl);
+}
+
+IDBFactoryBackendImpl::IDBFactoryBackendImpl()
+{
+}
+
+IDBFactoryBackendImpl::~IDBFactoryBackendImpl()
+{
+}
+
+void IDBFactoryBackendImpl::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin>, Frame*)
+{
+ RefPtr<IDBDatabase> database;
+ IDBDatabaseMap::iterator it = m_databaseMap.find(name);
+ if (it == m_databaseMap.end()) {
+ // FIXME: What should the version be? The spec doesn't define it yet.
+ database = IDBDatabaseImpl::create(name, description, "");
+ m_databaseMap.set(name, database);
+ } else
+ database = it->second;
+
+ callbacks->onSuccess(database.release());
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebCore/storage/IDBFactoryBackendImpl.h b/WebCore/storage/IDBFactoryBackendImpl.h
new file mode 100644
index 0000000..bb28b6d
--- /dev/null
+++ b/WebCore/storage/IDBFactoryBackendImpl.h
@@ -0,0 +1,63 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IDBFactoryBackendImpl_h
+#define IDBFactoryBackendImpl_h
+
+#include "IDBFactoryBackendInterface.h"
+#include "StringHash.h"
+#include <wtf/HashMap.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class DOMStringList;
+
+class IDBFactoryBackendImpl : public IDBFactoryBackendInterface {
+public:
+ static PassRefPtr<IDBFactoryBackendImpl> create();
+ virtual ~IDBFactoryBackendImpl();
+
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
+
+private:
+ IDBFactoryBackendImpl();
+
+ typedef HashMap<String, RefPtr<IDBDatabase> > IDBDatabaseMap;
+ IDBDatabaseMap m_databaseMap;
+
+ // We only create one instance of this class at a time.
+ static IDBFactoryBackendImpl* idbFactoryBackendImpl;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBFactoryBackendImpl_h
+
diff --git a/WebCore/storage/IDBFactoryBackendInterface.cpp b/WebCore/storage/IDBFactoryBackendInterface.cpp
new file mode 100644
index 0000000..f1c0fb7
--- /dev/null
+++ b/WebCore/storage/IDBFactoryBackendInterface.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IDBFactoryBackendInterface.h"
+
+#include "IDBFactoryBackendImpl.h"
+
+#if PLATFORM(CHROMIUM)
+#error "Chromium should not compile this file and instead define its own version of this factory that navigates the multi-process boundry."
+#endif
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendInterface::create()
+{
+ return IDBFactoryBackendImpl::create();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebCore/storage/IDBFactoryBackendInterface.h b/WebCore/storage/IDBFactoryBackendInterface.h
new file mode 100644
index 0000000..ba18098
--- /dev/null
+++ b/WebCore/storage/IDBFactoryBackendInterface.h
@@ -0,0 +1,61 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IDBFactoryBackendInterface_h
+#define IDBFactoryBackendInterface_h
+
+#include "ExceptionCode.h"
+#include "IDBCallbacks.h"
+#include "PlatformString.h"
+#include <wtf/Threading.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class Frame;
+class IDBDatabase;
+class SecurityOrigin;
+
+// This class is shared by IDBFactory (async) and IDBFactorySync (sync).
+// This is implemented by IDBFactoryBackendImpl and optionally others (in order to proxy
+// calls across process barriers). All calls to these classes should be non-blocking and
+// trigger work on a background thread if necessary.
+class IDBFactoryBackendInterface : public ThreadSafeShared<IDBFactoryBackendInterface> {
+public:
+ static PassRefPtr<IDBFactoryBackendInterface> create();
+ virtual ~IDBFactoryBackendInterface() { }
+
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*) = 0;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBFactoryBackendInterface_h
+
diff --git a/WebCore/storage/IDBKeyRange.h b/WebCore/storage/IDBKeyRange.h
index 9ce07af..5a426b7 100644
--- a/WebCore/storage/IDBKeyRange.h
+++ b/WebCore/storage/IDBKeyRange.h
@@ -49,6 +49,7 @@ public:
{
return adoptRef(new IDBKeyRange(left, right, flags));
}
+
~IDBKeyRange() { }
@@ -60,6 +61,7 @@ public:
static PassRefPtr<IDBKeyRange> leftBound(PassRefPtr<IDBKey> bound, bool open = false);
static PassRefPtr<IDBKeyRange> rightBound(PassRefPtr<IDBKey> bound, bool open = false);
static PassRefPtr<IDBKeyRange> bound(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, bool openLeft = false, bool openRight = false);
+
private:
IDBKeyRange(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, unsigned short flags);
diff --git a/WebCore/storage/IndexedDatabase.cpp b/WebCore/storage/IndexedDatabase.cpp
deleted file mode 100644
index a20974b..0000000
--- a/WebCore/storage/IndexedDatabase.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IndexedDatabase.h"
-
-#include "IndexedDatabaseImpl.h"
-
-#if PLATFORM(CHROMIUM)
-#error "Chromium should not compile this file and instead define its own version of this factory that navigates the multi-process boundry."
-#endif
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-PassRefPtr<IndexedDatabase> IndexedDatabase::create()
-{
- return IndexedDatabaseImpl::create();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebCore/storage/IndexedDatabase.h b/WebCore/storage/IndexedDatabase.h
deleted file mode 100644
index e6abf4a..0000000
--- a/WebCore/storage/IndexedDatabase.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IndexedDatabase_h
-#define IndexedDatabase_h
-
-#include "ExceptionCode.h"
-#include "IDBCallbacks.h"
-#include "PlatformString.h"
-#include <wtf/Threading.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class Frame;
-class IDBDatabase;
-class SecurityOrigin;
-
-// This class is shared by IndexedDatabaseRequest (async) and IndexedDatabaseSync (sync).
-// This is implemented by IndexedDatabaseImpl and optionally others (in order to proxy
-// calls across process barriers). All calls to these classes should be non-blocking and
-// trigger work on a background thread if necessary.
-class IndexedDatabase : public ThreadSafeShared<IndexedDatabase> {
-public:
- static PassRefPtr<IndexedDatabase> create();
- virtual ~IndexedDatabase() { }
-
- virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*) = 0;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IndexedDatabase_h
-
diff --git a/WebCore/storage/IndexedDatabaseImpl.cpp b/WebCore/storage/IndexedDatabaseImpl.cpp
deleted file mode 100644
index e6af901..0000000
--- a/WebCore/storage/IndexedDatabaseImpl.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IndexedDatabaseImpl.h"
-
-#include "IDBDatabaseImpl.h"
-#include "SecurityOrigin.h"
-#include <wtf/Threading.h>
-#include <wtf/UnusedParam.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-PassRefPtr<IndexedDatabaseImpl> IndexedDatabaseImpl::create()
-{
- return adoptRef(new IndexedDatabaseImpl);
-}
-
-IndexedDatabaseImpl::IndexedDatabaseImpl()
-{
-}
-
-IndexedDatabaseImpl::~IndexedDatabaseImpl()
-{
-}
-
-void IndexedDatabaseImpl::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin>, Frame*)
-{
- RefPtr<IDBDatabase> database;
- IDBDatabaseMap::iterator it = m_databaseMap.find(name);
- if (it == m_databaseMap.end()) {
- // FIXME: What should the version be? The spec doesn't define it yet.
- database = IDBDatabaseImpl::create(name, description, "");
- m_databaseMap.set(name, database);
- } else
- database = it->second;
-
- callbacks->onSuccess(database.release());
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebCore/storage/IndexedDatabaseImpl.h b/WebCore/storage/IndexedDatabaseImpl.h
deleted file mode 100644
index b9520ee..0000000
--- a/WebCore/storage/IndexedDatabaseImpl.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IndexedDatabaseImpl_h
-#define IndexedDatabaseImpl_h
-
-#include "IndexedDatabase.h"
-#include "StringHash.h"
-#include <wtf/HashMap.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IndexedDatabaseImpl : public IndexedDatabase {
-public:
- static PassRefPtr<IndexedDatabaseImpl> create();
- virtual ~IndexedDatabaseImpl();
-
- virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
-
-private:
- IndexedDatabaseImpl();
-
- typedef HashMap<String, RefPtr<IDBDatabase> > IDBDatabaseMap;
- IDBDatabaseMap m_databaseMap;
-
- // We only create one instance of this class at a time.
- static IndexedDatabaseImpl* indexedDatabaseImpl;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IndexedDatabaseImpl_h
-
diff --git a/WebCore/storage/IndexedDatabaseRequest.cpp b/WebCore/storage/IndexedDatabaseRequest.cpp
deleted file mode 100644
index c1c5515..0000000
--- a/WebCore/storage/IndexedDatabaseRequest.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IndexedDatabaseRequest.h"
-
-#include "Document.h"
-#include "ExceptionCode.h"
-#include "Frame.h"
-#include "IDBDatabase.h"
-#include "IDBKeyRange.h"
-#include "IDBRequest.h"
-#include "IndexedDatabase.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-IndexedDatabaseRequest::IndexedDatabaseRequest(IndexedDatabase* indexedDatabase)
- : m_indexedDatabase(indexedDatabase)
-{
- // We pass a reference to this object before it can be adopted.
- relaxAdoptionRequirement();
-}
-
-IndexedDatabaseRequest::~IndexedDatabaseRequest()
-{
-}
-
-PassRefPtr<IDBRequest> IndexedDatabaseRequest::open(ScriptExecutionContext* context, const String& name, const String& description)
-{
- if (!context->isDocument()) {
- // FIXME: make this work with workers.
- return 0;
- }
-
- Document* document = static_cast<Document*>(context);
- if (!document->frame())
- return 0;
-
- RefPtr<IDBRequest> request = IDBRequest::create(document, IDBAny::create(this));
- m_indexedDatabase->open(name, description, request, document->securityOrigin(), document->frame());
- return request;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IndexedDatabaseRequest.h b/WebCore/storage/IndexedDatabaseRequest.h
deleted file mode 100644
index 57f8a78..0000000
--- a/WebCore/storage/IndexedDatabaseRequest.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IndexedDatabaseRequest_h
-#define IndexedDatabaseRequest_h
-
-#include "ExceptionCode.h"
-#include "IndexedDatabase.h"
-#include "PlatformString.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBKey;
-class IDBKeyRange;
-class IDBRequest;
-class IndexedDatabase;
-class ScriptExecutionContext;
-
-class IndexedDatabaseRequest : public RefCounted<IndexedDatabaseRequest> {
-public:
- static PassRefPtr<IndexedDatabaseRequest> create(IndexedDatabase* indexedDatabase)
- {
- return adoptRef(new IndexedDatabaseRequest(indexedDatabase));
- }
- ~IndexedDatabaseRequest();
-
- PassRefPtr<IDBRequest> open(ScriptExecutionContext*, const String& name, const String& description);
-
-private:
- IndexedDatabaseRequest(IndexedDatabase*);
-
- RefPtr<IndexedDatabase> m_indexedDatabase;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IndexedDatabaseRequest_h
-
diff --git a/WebCore/storage/IndexedDatabaseRequest.idl b/WebCore/storage/IndexedDatabaseRequest.idl
deleted file mode 100644
index e6ee446..0000000
--- a/WebCore/storage/IndexedDatabaseRequest.idl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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:
- *
- * 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-module storage {
-
- interface [
- Conditional=INDEXED_DATABASE
- ] IndexedDatabaseRequest {
- [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name, in DOMString description);
- };
-
-}
diff --git a/WebCore/storage/chromium/IDBFactoryBackendInterface.cpp b/WebCore/storage/chromium/IDBFactoryBackendInterface.cpp
new file mode 100644
index 0000000..016cab0
--- /dev/null
+++ b/WebCore/storage/chromium/IDBFactoryBackendInterface.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IDBFactoryBackendInterface.h"
+
+#include "ChromiumBridge.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendInterface::create()
+{
+ return ChromiumBridge::idbFactory();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebCore/storage/chromium/IndexedDatabase.cpp b/WebCore/storage/chromium/IndexedDatabase.cpp
deleted file mode 100644
index 6f53f92..0000000
--- a/WebCore/storage/chromium/IndexedDatabase.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IndexedDatabase.h"
-
-#include "ChromiumBridge.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-PassRefPtr<IndexedDatabase> IndexedDatabase::create()
-{
- return ChromiumBridge::indexedDatabase();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 4aacdad..05c9058 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,37 @@
+2010-07-26 Andrei Popescu <andreip at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [IndexedDB] IndexedDatabase should be called IDBFactory.
+ https://bugs.webkit.org/show_bug.cgi?id=42967
+
+ * WebKit.gyp:
+ * public/WebIDBFactory.h: Added.
+ (WebKit::WebIDBFactory::~WebIDBFactory):
+ (WebKit::WebIDBFactory::databases):
+ (WebKit::WebIDBFactory::open):
+ * public/WebIndexedDatabase.h: Removed.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::idbFactory):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::idbFactory):
+ * src/IDBFactoryBackendProxy.cpp: Added.
+ (WebCore::IDBFactoryBackendProxy::create):
+ (WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy):
+ (WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy):
+ (WebCore::IDBFactoryBackendProxy::open):
+ * src/IDBFactoryBackendProxy.h: Added.
+ * src/IndexedDatabaseProxy.cpp: Removed.
+ * src/IndexedDatabaseProxy.h: Removed.
+ * src/WebIDBFactoryImpl.cpp: Added.
+ (WebKit::WebIDBFactory::create):
+ (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl):
+ (WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl):
+ (WebKit::WebIDBFactoryImpl::open):
+ * src/WebIDBFactoryImpl.h: Added.
+ * src/WebIndexedDatabaseImpl.cpp: Removed.
+ * src/WebIndexedDatabaseImpl.h: Removed.
+
2010-07-29 Andrei Popescu <andreip at google.com>
Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 97efddc..ec96a50 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -178,10 +178,10 @@
'public/WebIDBCallbacks.h',
'public/WebIDBDatabase.h',
'public/WebIDBDatabaseError.h',
+ 'public/WebIDBFactory.h',
'public/WebIDBIndex.h',
'public/WebIDBKey.h',
'public/WebIDBObjectStore.h',
- 'public/WebIndexedDatabase.h',
'public/WebInputElement.h',
'public/WebInputEvent.h',
'public/WebKit.h',
@@ -321,12 +321,12 @@
'src/IDBCallbacksProxy.h',
'src/IDBDatabaseProxy.cpp',
'src/IDBDatabaseProxy.h',
+ 'src/IDBFactoryBackendProxy.cpp',
+ 'src/IDBFactoryBackendProxy.h',
'src/IDBIndexProxy.cpp',
'src/IDBIndexProxy.h',
'src/IDBObjectStoreProxy.cpp',
'src/IDBObjectStoreProxy.h',
- 'src/IndexedDatabaseProxy.cpp',
- 'src/IndexedDatabaseProxy.h',
'src/InspectorClientImpl.cpp',
'src/InspectorClientImpl.h',
'src/InspectorFrontendClientImpl.cpp',
@@ -417,6 +417,8 @@
'src/WebIDBDatabaseError.cpp',
'src/WebIDBDatabaseImpl.cpp',
'src/WebIDBDatabaseImpl.h',
+ 'src/WebIDBFactoryImpl.cpp',
+ 'src/WebIDBFactoryImpl.h',
'src/WebIDBIndexImpl.cpp',
'src/WebIDBIndexImpl.h',
'src/WebIDBKey.cpp',
@@ -425,8 +427,6 @@
'src/WebImageCG.cpp',
'src/WebImageDecoder.cpp',
'src/WebImageSkia.cpp',
- 'src/WebIndexedDatabaseImpl.cpp',
- 'src/WebIndexedDatabaseImpl.h',
'src/WebInputElement.cpp',
'src/WebInputEvent.cpp',
'src/WebInputEventConversion.cpp',
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
new file mode 100755
index 0000000..5eb6f58
--- /dev/null
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -0,0 +1,70 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 WebIDBFactory_h
+#define WebIDBFactory_h
+
+#include "WebCommon.h"
+#include "WebDOMStringList.h"
+#include "WebIDBCallbacks.h"
+#include "WebSecurityOrigin.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebFrame;
+class WebIDBDatabase;
+class WebString;
+class WebSecurityOrigin;
+
+// The entry point into the IndexedDatabase API. These classes match their Foo and
+// FooSync counterparts in the spec, but operate only in an async manner.
+// http://dev.w3.org/2006/webapi/WebSimpleDB/
+class WebIDBFactory {
+public:
+ WEBKIT_API static WebIDBFactory* create();
+
+ virtual ~WebIDBFactory() { }
+
+ // The WebKit implementation of open ignores the WebFrame* parameter.
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame)
+ {
+ int exceptionCode;
+ open(name, description, callbacks, origin, webFrame, exceptionCode);
+ }
+ // FIXME: Delete soon. Compatability hack.
+ virtual void open(const WebString& name, const WebString& description,
+ WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, int& exceptionCode)
+ {
+ open(name, description, callbacks, origin, webFrame);
+ }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBFactory_h
diff --git a/WebKit/chromium/public/WebIndexedDatabase.h b/WebKit/chromium/public/WebIndexedDatabase.h
deleted file mode 100644
index 5517a0c..0000000
--- a/WebKit/chromium/public/WebIndexedDatabase.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 WebIndexedDatabase_h
-#define WebIndexedDatabase_h
-
-#include "WebCommon.h"
-#include "WebIDBCallbacks.h"
-#include "WebSecurityOrigin.h"
-#include "WebString.h"
-
-namespace WebKit {
-
-class WebFrame;
-class WebIDBDatabase;
-class WebString;
-class WebSecurityOrigin;
-
-// The entry point into the IndexedDatabase API. These classes match their _____Request and
-// _____Sync counterparts in the spec, but operate only in an async manner.
-// http://dev.w3.org/2006/webapi/WebSimpleDB/
-class WebIndexedDatabase {
-public:
- WEBKIT_API static WebIndexedDatabase* create();
-
- virtual ~WebIndexedDatabase() { }
-
- // The WebKit implementation of open ignores the WebFrame* parameter.
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame)
- {
- int exceptionCode;
- open(name, description, callbacks, origin, webFrame, exceptionCode);
- }
- // FIXME: Delete soon. Compatability hack.
- virtual void open(const WebString& name, const WebString& description,
- WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, int& exceptionCode)
- {
- open(name, description, callbacks, origin, webFrame);
- }
-};
-
-} // namespace WebKit
-
-#endif // WebIndexedDatabase_h
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 48765ac..5959a1c 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -52,7 +52,7 @@ class WebCookieJar;
class WebFileSystem;
class WebGLES2Context;
class WebGraphicsContext3D;
-class WebIndexedDatabase;
+class WebIDBFactory;
class WebMessagePortChannel;
class WebMimeRegistry;
class WebPluginListBuilder;
@@ -131,7 +131,7 @@ public:
// Indexed Database ----------------------------------------------------
- virtual WebIndexedDatabase* indexedDatabase() { return 0; }
+ virtual WebIDBFactory* idbFactory() { return 0; }
// Keygen --------------------------------------------------------------
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 78e0693..397ea17 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -77,7 +77,7 @@
#include "Cookie.h"
#include "FrameView.h"
#include "GraphicsContext.h"
-#include "IndexedDatabaseProxy.h"
+#include "IDBFactoryBackendProxy.h"
#include "KURL.h"
#include "NotImplemented.h"
#include "PlatformContextSkia.h"
@@ -493,11 +493,11 @@ long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName)
// Indexed Database -----------------------------------------------------------
-PassRefPtr<IndexedDatabase> ChromiumBridge::indexedDatabase()
+PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory()
{
// There's no reason why we need to allocate a new proxy each time, but
// there's also no strong reason not to.
- return IndexedDatabaseProxy::create();
+ return IDBFactoryBackendProxy::create();
}
// Keygen ---------------------------------------------------------------------
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
new file mode 100755
index 0000000..44cbb40
--- /dev/null
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
@@ -0,0 +1,70 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IDBFactoryBackendProxy.h"
+
+#include "DOMStringList.h"
+#include "IDBDatabaseError.h"
+#include "IDBDatabaseProxy.h"
+#include "WebFrameImpl.h"
+#include "WebIDBCallbacksImpl.h"
+#include "WebIDBDatabase.h"
+#include "WebIDBDatabaseError.h"
+#include "WebIDBFactory.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendProxy::create()
+{
+ return adoptRef(new IDBFactoryBackendProxy());
+}
+
+IDBFactoryBackendProxy::IDBFactoryBackendProxy()
+ : m_webIDBFactory(WebKit::webKitClient()->idbFactory())
+{
+}
+
+IDBFactoryBackendProxy::~IDBFactoryBackendProxy()
+{
+}
+
+void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame)
+{
+ WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
+ m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h
new file mode 100755
index 0000000..969a9d7
--- /dev/null
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IDBFactoryBackendProxy_h
+#define IDBFactoryBackendProxy_h
+
+#include "IDBFactoryBackendInterface.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebKit { class WebIDBFactory; }
+
+namespace WebCore {
+
+class DOMStringList;
+
+class IDBFactoryBackendProxy : public IDBFactoryBackendInterface {
+public:
+ static PassRefPtr<IDBFactoryBackendInterface> create();
+ virtual ~IDBFactoryBackendProxy();
+
+ PassRefPtr<DOMStringList> databases(void) const;
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
+
+private:
+ IDBFactoryBackendProxy();
+
+ // We don't own this pointer (unlike all the other proxy classes which do).
+ WebKit::WebIDBFactory* m_webIDBFactory;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBFactoryBackendProxy_h
+
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IndexedDatabaseProxy.cpp
deleted file mode 100644
index bee99b2..0000000
--- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "IndexedDatabaseProxy.h"
-
-#include "IDBDatabaseError.h"
-#include "IDBDatabaseProxy.h"
-#include "WebFrameImpl.h"
-#include "WebIDBCallbacksImpl.h"
-#include "WebIDBDatabase.h"
-#include "WebIDBDatabaseError.h"
-#include "WebIndexedDatabase.h"
-#include "WebKit.h"
-#include "WebKitClient.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-PassRefPtr<IndexedDatabase> IndexedDatabaseProxy::create()
-{
- return adoptRef(new IndexedDatabaseProxy());
-}
-
-IndexedDatabaseProxy::IndexedDatabaseProxy()
- : m_webIndexedDatabase(WebKit::webKitClient()->indexedDatabase())
-{
-}
-
-IndexedDatabaseProxy::~IndexedDatabaseProxy()
-{
-}
-
-void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame)
-{
- WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
- m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IndexedDatabaseProxy.h
deleted file mode 100644
index 53097f0..0000000
--- a/WebKit/chromium/src/IndexedDatabaseProxy.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 IndexedDatabaseProxy_h
-#define IndexedDatabaseProxy_h
-
-#include "IndexedDatabase.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebKit { class WebIndexedDatabase; }
-
-namespace WebCore {
-
-class IndexedDatabaseProxy : public IndexedDatabase {
-public:
- static PassRefPtr<IndexedDatabase> create();
- virtual ~IndexedDatabaseProxy();
-
- virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
-
-private:
- IndexedDatabaseProxy();
-
- // We don't own this pointer (unlike all the other proxy classes which do).
- WebKit::WebIndexedDatabase* m_webIndexedDatabase;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IndexedDatabaseProxy_h
-
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
new file mode 100755
index 0000000..5ac89f4
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "WebIDBFactoryImpl.h"
+
+#include "DOMStringList.h"
+#include "IDBCallbacksProxy.h"
+#include "IDBFactoryBackendImpl.h"
+#include "SecurityOrigin.h"
+#include "WebIDBDatabaseError.h"
+#include <wtf/OwnPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIDBFactory* WebIDBFactory::create()
+{
+ return new WebIDBFactoryImpl();
+}
+
+WebIDBFactoryImpl::WebIDBFactoryImpl()
+ : m_idbFactoryBackend(WebCore::IDBFactoryBackendImpl::create())
+{
+}
+
+WebIDBFactoryImpl::~WebIDBFactoryImpl()
+{
+}
+
+void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*)
+{
+ m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h
new file mode 100755
index 0000000..c9ec9a3
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.h
@@ -0,0 +1,53 @@
+/*
+ * 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:
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 WebIDBFactoryImpl_h
+#define WebIDBFactoryImpl_h
+
+#include "WebDOMStringList.h"
+#include "WebIDBFactory.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore { class IDBFactoryBackendInterface; }
+
+namespace WebKit {
+
+class WebIDBFactoryImpl : public WebIDBFactory {
+public:
+ WebIDBFactoryImpl();
+ virtual ~WebIDBFactoryImpl();
+
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*);
+
+private:
+ WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBFactoryImpl_h
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
deleted file mode 100644
index 27a6247..0000000
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "WebIndexedDatabaseImpl.h"
-
-#include "IDBCallbacksProxy.h"
-#include "IndexedDatabaseImpl.h"
-#include "SecurityOrigin.h"
-#include "WebIDBDatabaseError.h"
-#include <wtf/OwnPtr.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebIndexedDatabase* WebIndexedDatabase::create()
-{
- return new WebIndexedDatabaseImpl();
-}
-
-WebIndexedDatabaseImpl::WebIndexedDatabaseImpl()
- : m_indexedDatabase(WebCore::IndexedDatabaseImpl::create())
-{
-}
-
-WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl()
-{
-}
-
-void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*)
-{
- m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0);
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIndexedDatabaseImpl.h
deleted file mode 100644
index 76781e5..0000000
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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:
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 WebIndexedDatabaseImpl_h
-#define WebIndexedDatabaseImpl_h
-
-#include "WebIndexedDatabase.h"
-#include <wtf/RefPtr.h>
-
-namespace WebCore { class IndexedDatabase; }
-
-namespace WebKit {
-
-class WebIndexedDatabaseImpl : public WebIndexedDatabase {
-public:
- WebIndexedDatabaseImpl();
- virtual ~WebIndexedDatabaseImpl();
-
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*);
-
-private:
- WTF::RefPtr<WebCore::IndexedDatabase> m_indexedDatabase;
-};
-
-} // namespace WebKit
-
-#endif // WebIndexedDatabaseImpl_h
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list