diff options
Diffstat (limited to 'chrome/browser/in_process_webkit/indexed_db_callbacks.cc')
-rw-r--r-- | chrome/browser/in_process_webkit/indexed_db_callbacks.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/in_process_webkit/indexed_db_callbacks.cc b/chrome/browser/in_process_webkit/indexed_db_callbacks.cc index 41ac4ed..c4584c6 100644 --- a/chrome/browser/in_process_webkit/indexed_db_callbacks.cc +++ b/chrome/browser/in_process_webkit/indexed_db_callbacks.cc @@ -4,6 +4,8 @@ #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" +#include "chrome/common/indexed_db_messages.h" + IndexedDBCallbacksBase::IndexedDBCallbacksBase( IndexedDBDispatcherHost* dispatcher_host, int32 response_id) @@ -27,6 +29,10 @@ void IndexedDBCallbacksBase::onError(const WebKit::WebIDBDatabaseError& error) { response_id_, error.code(), error.message())); } +void IndexedDBCallbacksBase::onBlocked() { + dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(response_id_)); +} + void IndexedDBTransactionCallbacks::onAbort() { dispatcher_host_->Send( new IndexedDBMsg_TransactionCallbacksAbort(transaction_id_)); @@ -41,3 +47,31 @@ void IndexedDBTransactionCallbacks::onTimeout() { dispatcher_host_->Send( new IndexedDBMsg_TransactionCallbacksTimeout(transaction_id_)); } + +void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( + WebKit::WebIDBCursor* idb_object) { + int32 object_id = dispatcher_host()->Add(idb_object); + dispatcher_host()->Send( + new IndexedDBMsg_CallbacksSuccessIDBCursor(response_id(), object_id)); +} + +void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( + const WebKit::WebSerializedScriptValue& value) { + dispatcher_host()->Send( + new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( + response_id(), SerializedScriptValue(value))); +} + +void IndexedDBCallbacks<WebKit::WebIDBKey>::onSuccess( + const WebKit::WebIDBKey& value) { + dispatcher_host()->Send( + new IndexedDBMsg_CallbacksSuccessIndexedDBKey( + response_id(), IndexedDBKey(value))); +} + +void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( + const WebKit::WebSerializedScriptValue& value) { + dispatcher_host()->Send( + new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( + response_id(), SerializedScriptValue(value))); +} |