diff options
Diffstat (limited to 'WebCore/storage/DatabaseTask.h')
-rw-r--r-- | WebCore/storage/DatabaseTask.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/WebCore/storage/DatabaseTask.h b/WebCore/storage/DatabaseTask.h index 998e373..9673a26 100644 --- a/WebCore/storage/DatabaseTask.h +++ b/WebCore/storage/DatabaseTask.h @@ -29,8 +29,10 @@ #define DatabaseTask_h #if ENABLE(DATABASE) +#include "Database.h" #include "ExceptionCode.h" #include "PlatformString.h" +#include "SQLTransaction.h" #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> @@ -39,14 +41,6 @@ namespace WebCore { -class Database; -class DatabaseTask; -class DatabaseThread; -class SQLValue; -class SQLCallback; -class SQLTransaction; -class VersionChangeCallback; - // Can be used to wait until DatabaseTask is completed. // Has to be passed into DatabaseTask::create to be associated with the task. class DatabaseTaskSynchronizer : public Noncopyable { @@ -66,7 +60,6 @@ private: }; class DatabaseTask : public Noncopyable { - friend class Database; public: virtual ~DatabaseTask(); @@ -89,29 +82,30 @@ private: #endif }; -class DatabaseOpenTask : public DatabaseTask { +class Database::DatabaseOpenTask : public DatabaseTask { public: - static PassOwnPtr<DatabaseOpenTask> create(Database* db, DatabaseTaskSynchronizer* synchronizer, ExceptionCode& code, bool& success) + static PassOwnPtr<DatabaseOpenTask> create(Database* db, bool setVersionInNewDatabase, DatabaseTaskSynchronizer* synchronizer, ExceptionCode& code, bool& success) { - return new DatabaseOpenTask(db, synchronizer, code, success); + return new DatabaseOpenTask(db, setVersionInNewDatabase, synchronizer, code, success); } private: - DatabaseOpenTask(Database*, DatabaseTaskSynchronizer*, ExceptionCode&, bool& success); + DatabaseOpenTask(Database*, bool setVersionInNewDatabase, DatabaseTaskSynchronizer*, ExceptionCode&, bool& success); virtual void doPerformTask(); #ifndef NDEBUG virtual const char* debugTaskName() const; #endif + bool m_setVersionInNewDatabase; ExceptionCode& m_code; bool& m_success; }; -class DatabaseCloseTask : public DatabaseTask { +class Database::DatabaseCloseTask : public DatabaseTask { public: static PassOwnPtr<DatabaseCloseTask> create(Database* db, DatabaseTaskSynchronizer* synchronizer) - { + { return new DatabaseCloseTask(db, synchronizer); } @@ -124,7 +118,7 @@ private: #endif }; -class DatabaseTransactionTask : public DatabaseTask { +class Database::DatabaseTransactionTask : public DatabaseTask { public: // Transaction task is never synchronous, so no 'synchronizer' parameter. static PassOwnPtr<DatabaseTransactionTask> create(PassRefPtr<SQLTransaction> transaction) @@ -134,7 +128,6 @@ public: SQLTransaction* transaction() const { return m_transaction.get(); } - virtual ~DatabaseTransactionTask(); private: DatabaseTransactionTask(PassRefPtr<SQLTransaction>); @@ -146,7 +139,7 @@ private: RefPtr<SQLTransaction> m_transaction; }; -class DatabaseTableNamesTask : public DatabaseTask { +class Database::DatabaseTableNamesTask : public DatabaseTask { public: static PassOwnPtr<DatabaseTableNamesTask> create(Database* db, DatabaseTaskSynchronizer* synchronizer, Vector<String>& names) { |