diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/storage/IDBDatabase.h | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/storage/IDBDatabase.h')
-rw-r--r-- | WebCore/storage/IDBDatabase.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/WebCore/storage/IDBDatabase.h b/WebCore/storage/IDBDatabase.h index dc70114..df56f46 100644 --- a/WebCore/storage/IDBDatabase.h +++ b/WebCore/storage/IDBDatabase.h @@ -27,7 +27,9 @@ #define IDBDatabase_h #include "DOMStringList.h" +#include "ExceptionCode.h" #include "IDBDatabaseBackendInterface.h" +#include "IDBObjectStore.h" #include "IDBTransaction.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> @@ -38,7 +40,6 @@ namespace WebCore { class IDBAny; -class IDBObjectStore; class IDBRequest; class ScriptExecutionContext; @@ -50,22 +51,31 @@ public: } ~IDBDatabase(); + void setSetVersionTransaction(IDBTransactionBackendInterface*); + // Implement the IDL String name() const { return m_backend->name(); } String version() const { return m_backend->version(); } PassRefPtr<DOMStringList> objectStores() const { return m_backend->objectStores(); } - PassRefPtr<IDBRequest> createObjectStore(ScriptExecutionContext*, const String& name, const String& keyPath = String(), bool autoIncrement = false); - PassRefPtr<IDBObjectStore> objectStore(const String& name, unsigned short mode = IDBTransaction::READ_ONLY); - PassRefPtr<IDBRequest> removeObjectStore(ScriptExecutionContext*, const String& name); - PassRefPtr<IDBRequest> setVersion(ScriptExecutionContext*, const String& version); - PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, DOMStringList* storeNames = 0, unsigned short mode = IDBTransaction::READ_ONLY, - unsigned long timeout = 0); // FIXME: what should the default timeout be? + // FIXME: Try to modify the code generator so this is unneeded. + PassRefPtr<IDBObjectStore> createObjectStore(const String& name, ExceptionCode& ec) { return createObjectStore(name, String(), ec); } + PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const String& keyPath, ExceptionCode& ec) { return createObjectStore(name, keyPath, false, ec); } + PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, ExceptionCode& ec) { return transaction(context, 0, ec); } + PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, DOMStringList* storeNames, ExceptionCode& ec) { return transaction(context, storeNames, IDBTransaction::READ_ONLY, ec); } + PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, DOMStringList* storeNames, unsigned short mode, ExceptionCode& ec) { return transaction(context, storeNames, mode, 0, ec); } // FIXME: what should the default timeout be? + + PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, ExceptionCode&); + void removeObjectStore(const String& name, ExceptionCode&); + PassRefPtr<IDBRequest> setVersion(ScriptExecutionContext*, const String& version, ExceptionCode&); + PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, DOMStringList*, unsigned short mode, unsigned long timeout, ExceptionCode&); + void close(); private: IDBDatabase(PassRefPtr<IDBDatabaseBackendInterface>); RefPtr<IDBDatabaseBackendInterface> m_backend; + RefPtr<IDBTransactionBackendInterface> m_setVersionTransaction; }; } // namespace WebCore |