| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" | 5 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" |
| 6 | 6 |
| 7 IndexedDBCallbacksBase::IndexedDBCallbacksBase( | 7 IndexedDBCallbacksBase::IndexedDBCallbacksBase( |
| 8 IndexedDBDispatcherHost* dispatcher_host, | 8 IndexedDBDispatcherHost* dispatcher_host, |
| 9 int32 response_id) | 9 int32 response_id) |
| 10 : dispatcher_host_(dispatcher_host), | 10 : dispatcher_host_(dispatcher_host), |
| 11 response_id_(response_id) { | 11 response_id_(response_id) { |
| 12 } | 12 } |
| 13 | 13 |
| 14 IndexedDBCallbacksBase::~IndexedDBCallbacksBase() {} | 14 IndexedDBCallbacksBase::~IndexedDBCallbacksBase() {} |
| 15 | 15 |
| 16 IndexedDBTransactionCallbacks::IndexedDBTransactionCallbacks( | 16 IndexedDBTransactionCallbacks::IndexedDBTransactionCallbacks( |
| 17 IndexedDBDispatcherHost* dispatcher_host, | 17 IndexedDBDispatcherHost* dispatcher_host, |
| 18 int transaction_id) | 18 int transaction_id) |
| 19 : dispatcher_host_(dispatcher_host), | 19 : dispatcher_host_(dispatcher_host), |
| 20 transaction_id_(transaction_id) { | 20 transaction_id_(transaction_id) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 IndexedDBTransactionCallbacks::~IndexedDBTransactionCallbacks() {} | 23 IndexedDBTransactionCallbacks::~IndexedDBTransactionCallbacks() {} |
| 24 | 24 |
| 25 void IndexedDBCallbacksBase::onError(const WebKit::WebIDBDatabaseError& error) { | 25 void IndexedDBCallbacksBase::onError(const WebKit::WebIDBDatabaseError& error) { |
| 26 dispatcher_host_->Send(new ViewMsg_IDBCallbacksError( | 26 dispatcher_host_->Send(new IndexedDBMsg_CallbacksError( |
| 27 response_id_, error.code(), error.message())); | 27 response_id_, error.code(), error.message())); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void IndexedDBTransactionCallbacks::onAbort() { | 30 void IndexedDBTransactionCallbacks::onAbort() { |
| 31 dispatcher_host_->Send( | 31 dispatcher_host_->Send( |
| 32 new ViewMsg_IDBTransactionCallbacksAbort(transaction_id_)); | 32 new IndexedDBMsg_TransactionCallbacksAbort(transaction_id_)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void IndexedDBTransactionCallbacks::onComplete() { | 35 void IndexedDBTransactionCallbacks::onComplete() { |
| 36 dispatcher_host_->Send( | 36 dispatcher_host_->Send( |
| 37 new ViewMsg_IDBTransactionCallbacksComplete(transaction_id_)); | 37 new IndexedDBMsg_TransactionCallbacksComplete(transaction_id_)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void IndexedDBTransactionCallbacks::onTimeout() { | 40 void IndexedDBTransactionCallbacks::onTimeout() { |
| 41 dispatcher_host_->Send( | 41 dispatcher_host_->Send( |
| 42 new ViewMsg_IDBTransactionCallbacksTimeout(transaction_id_)); | 42 new IndexedDBMsg_TransactionCallbacksTimeout(transaction_id_)); |
| 43 } | 43 } |
| OLD | NEW |