Index: chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h |
diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h |
index 436b547e78d4e34620369cc24a2bf07f02147891..ee2328410d075093cddd79c6d940c6dc0ff30d2a 100644 |
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h |
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h |
@@ -23,6 +23,7 @@ namespace WebKit { |
class WebIDBDatabase; |
class WebIDBIndex; |
class WebIDBObjectStore; |
+class WebIDBTransaction; |
} |
// Handles all IndexedDB related messages from a particular renderer process. |
@@ -57,6 +58,7 @@ class IndexedDBDispatcherHost |
int32 Add(WebKit::WebIDBDatabase* idb_database); |
int32 Add(WebKit::WebIDBIndex* idb_index); |
int32 Add(WebKit::WebIDBObjectStore* idb_object_store); |
+ void Add(WebKit::WebIDBTransaction* idb_transaction); |
private: |
friend class base::RefCountedThreadSafe<IndexedDBDispatcherHost>; |
@@ -66,6 +68,7 @@ class IndexedDBDispatcherHost |
// below. |
void OnMessageReceivedWebKit(const IPC::Message& message); |
void OnIDBFactoryOpen(const ViewHostMsg_IDBFactoryOpen_Params& p); |
+ void OnIDBFactoryAbortPendingTransactions(const std::vector<int32>& ids); |
// Helper templates. |
template <class ReturnType> |
@@ -100,6 +103,9 @@ class IndexedDBDispatcherHost |
IPC::Message* reply_msg); |
void OnRemoveObjectStore(int32 idb_database_id, int32 response_id, |
const string16& name); |
+ void OnTransaction(int32 idb_database_id, |
+ const std::vector<string16>& names, |
+ int32 mode, int32 timeout, IPC::Message* reply_msg); |
void OnDestroyed(int32 idb_database_id); |
IndexedDBDispatcherHost* parent_; |
@@ -152,6 +158,22 @@ class IndexedDBDispatcherHost |
IndexedDBDispatcherHost* parent_; |
IDMap<WebKit::WebIDBObjectStore, IDMapOwnPointer> map_; |
}; |
+ |
+ class TransactionDispatcherHost { |
+ public: |
+ explicit TransactionDispatcherHost(IndexedDBDispatcherHost* parent); |
+ ~TransactionDispatcherHost(); |
+ |
+ bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); |
+ void Send(IPC::Message* message); |
+ |
+ // TODO: add the rest of the transaction methods. |
+ void OnDestroyed(int32 idb_transaction_id); |
+ |
+ IndexedDBDispatcherHost* parent_; |
+ IDMap<WebKit::WebIDBTransaction, IDMapOwnPointer> map_; |
+ }; |
+ |
// Only use on the IO thread. |
IPC::Message::Sender* sender_; |
@@ -162,6 +184,7 @@ class IndexedDBDispatcherHost |
scoped_ptr<DatabaseDispatcherHost> database_dispatcher_host_; |
scoped_ptr<IndexDispatcherHost> index_dispatcher_host_; |
scoped_ptr<ObjectStoreDispatcherHost> object_store_dispatcher_host_; |
+ scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
// If we get a corrupt message from a renderer, we need to kill it using this |
// handle. |