summaryrefslogtreecommitdiffstats
path: root/chrome/browser/in_process_webkit/indexed_db_callbacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/in_process_webkit/indexed_db_callbacks.h')
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_callbacks.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/in_process_webkit/indexed_db_callbacks.h b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
index 5421fc6..09a3bab 100644
--- a/chrome/browser/in_process_webkit/indexed_db_callbacks.h
+++ b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
@@ -15,6 +15,7 @@
#include "chrome/common/serialized_script_value.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBCursor.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBTransactionCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabaseError.h"
// Template magic to figure out what message to send to the renderer based on
@@ -158,5 +159,27 @@ class IndexedDBCallbacks<void> : public IndexedDBCallbacksBase {
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks);
};
+class IndexedDBTransactionCallbacks
+ : public WebKit::WebIDBTransactionCallbacks {
+public:
+ IndexedDBTransactionCallbacks(
+ IndexedDBDispatcherHost* dispatcher_host, int transaction_id)
+ : dispatcher_host_(dispatcher_host), transaction_id_(transaction_id) {
+ }
+
+ virtual void onAbort() {
+ dispatcher_host_->Send(new ViewMsg_IDBTransactionCallbacksAbort(
+ transaction_id_));
+ }
+
+ virtual int id() const {
+ return transaction_id_;
+ }
+
+private:
+ scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
+ int transaction_id_;
+};
+
#endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CALLBACKS_H_