Commit f9fe235a authored by andreip@google.com's avatar andreip@google.com

2010-07-26 Andrei Popescu <andreip@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@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
parent 08fd5124
......@@ -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 $@) $<
......
......@@ -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 $@) $<
......
......@@ -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 \
......
......@@ -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
......
2010-07-26 Andrei Popescu <andreip@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@chromium.org>
Reviewed by Pavel Feldman.
......@@ -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"
......
......@@ -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 \
......
......@@ -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
# ----
......
......@@ -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',
......
......@@ -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',
......
......@@ -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 \
......
......@@ -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) {
......
......@@ -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
This diff is collapsed.
......@@ -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);
}
......
......@@ -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();
}
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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*);
......
......@@ -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)
......
......@@ -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,