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.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/chrome/browser/in_process_webkit/indexed_db_callbacks.h b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
index cc90dd8..1c6ed37 100644
--- a/chrome/browser/in_process_webkit/indexed_db_callbacks.h
+++ b/chrome/browser/in_process_webkit/indexed_db_callbacks.h
@@ -14,8 +14,9 @@
#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"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBTransaction.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBTransactionCallbacks.h"
// Template magic to figure out what message to send to the renderer based on
// which (overloaded) onSuccess method we expect to be called.
@@ -29,6 +30,9 @@ template <> struct WebIDBToMsgHelper<WebKit::WebIDBIndex> {
template <> struct WebIDBToMsgHelper<WebKit::WebIDBObjectStore> {
typedef ViewMsg_IDBCallbacksSuccessIDBObjectStore MsgType;
};
+template <> struct WebIDBToMsgHelper<WebKit::WebIDBTransaction> {
+ typedef ViewMsg_IDBCallbacksSuccessIDBTransaction MsgType;
+};
// The code the following two classes share.
class IndexedDBCallbacksBase : public WebKit::WebIDBCallbacks {
@@ -88,7 +92,7 @@ class IndexedDBCallbacks<WebKit::WebIDBCursor>
virtual void onSuccess(WebKit::WebIDBCursor* idb_object) {
int32 object_id = dispatcher_host()->Add(idb_object);
dispatcher_host()->Send(
- new ViewMsg_IDBCallbackSuccessOpenCursor(response_id(), object_id));
+ new ViewMsg_IDBCallbacksSuccessIDBCursor(response_id(), object_id));
}
virtual void onSuccess() {
@@ -161,18 +165,25 @@ class IndexedDBCallbacks<void> : public IndexedDBCallbacksBase {
class IndexedDBTransactionCallbacks
: public WebKit::WebIDBTransactionCallbacks {
public:
- IndexedDBTransactionCallbacks(
- IndexedDBDispatcherHost* dispatcher_host, int transaction_id)
- : dispatcher_host_(dispatcher_host), transaction_id_(transaction_id) {
+ 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_));
+ dispatcher_host_->Send(
+ new ViewMsg_IDBTransactionCallbacksAbort(transaction_id_));
+ }
+
+ virtual void onComplete() {
+ dispatcher_host_->Send(
+ new ViewMsg_IDBTransactionCallbacksComplete(transaction_id_));
}
- virtual int id() const {
- return transaction_id_;
+ virtual void onTimeout() {
+ dispatcher_host_->Send(
+ new ViewMsg_IDBTransactionCallbacksTimeout(transaction_id_));
}
private: