Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
[WebKit-https.git] / Source / WebCore / Modules / indexeddb / IDBTransactionCoordinator.h
index 8299853..1520232 100644 (file)
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "IDBTransactionBackendInterface.h"
 #include <wtf/HashMap.h>
 #include <wtf/ListHashSet.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
 
-class IDBTransactionBackendImpl;
-class IDBTransactionCallbacks;
-class IDBDatabaseBackendImpl;
+class IDBTransactionBackend;
 
 // Transactions are executed in the order the were created.
 class IDBTransactionCoordinator {
@@ -46,24 +43,25 @@ public:
     virtual ~IDBTransactionCoordinator();
 
     // Called by transactions as they start and finish.
-    void didCreateTransaction(IDBTransactionBackendImpl*);
-    void didStartTransaction(IDBTransactionBackendImpl*);
-    void didFinishTransaction(IDBTransactionBackendImpl*);
+    void didCreateTransaction(IDBTransactionBackend*);
+    void didStartTransaction(IDBTransactionBackend*);
+    void didFinishTransaction(IDBTransactionBackend*);
 
 #ifndef NDEBUG
-    bool isActive(IDBTransactionBackendImpl*);
+    bool isActive(IDBTransactionBackend*);
 #endif
 
 private:
     IDBTransactionCoordinator();
 
     void processStartedTransactions();
+    bool canRunTransaction(IDBTransactionBackend*);
 
     // This is just an efficient way to keep references to all transactions.
-    HashMap<IDBTransactionBackendImpl*, RefPtr<IDBTransactionBackendImpl> > m_transactions;
+    HashMap<IDBTransactionBackend*, RefPtr<IDBTransactionBackend> > m_transactions;
     // Transactions in different states are grouped below.
-    ListHashSet<IDBTransactionBackendImpl*> m_startedTransactions;
-    HashSet<IDBTransactionBackendImpl*> m_runningTransactions;
+    ListHashSet<IDBTransactionBackend*> m_queuedTransactions;
+    HashSet<IDBTransactionBackend*> m_startedTransactions;
 };
 
 } // namespace WebCore