| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/in_process_webkit/indexed_db_database_callbacks.h" | 5 #include "content/browser/in_process_webkit/indexed_db_database_callbacks.h" |
| 6 | 6 |
| 7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 8 #include "content/common/indexed_db/indexed_db_messages.h" | 8 #include "content/common/indexed_db/indexed_db_messages.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 void IndexedDBDatabaseCallbacks::onVersionChange(long long old_version, | 30 void IndexedDBDatabaseCallbacks::onVersionChange(long long old_version, |
| 31 long long new_version) { | 31 long long new_version) { |
| 32 dispatcher_host_->Send( | 32 dispatcher_host_->Send( |
| 33 new IndexedDBMsg_DatabaseCallbacksIntVersionChange(ipc_thread_id_, | 33 new IndexedDBMsg_DatabaseCallbacksIntVersionChange(ipc_thread_id_, |
| 34 ipc_database_id_, | 34 ipc_database_id_, |
| 35 old_version, | 35 old_version, |
| 36 new_version)); | 36 new_version)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void IndexedDBDatabaseCallbacks::onVersionChange( | |
| 40 const WebKit::WebString& requested_version) { | |
| 41 dispatcher_host_->Send( | |
| 42 new IndexedDBMsg_DatabaseCallbacksVersionChange(ipc_thread_id_, | |
| 43 ipc_database_id_, | |
| 44 requested_version)); | |
| 45 } | |
| 46 | |
| 47 void IndexedDBDatabaseCallbacks::onAbort( | 39 void IndexedDBDatabaseCallbacks::onAbort( |
| 48 long long host_transaction_id, | 40 long long host_transaction_id, |
| 49 const WebKit::WebIDBDatabaseError& error) { | 41 const WebKit::WebIDBDatabaseError& error) { |
| 50 dispatcher_host_->FinishTransaction(host_transaction_id, false); | 42 dispatcher_host_->FinishTransaction(host_transaction_id, false); |
| 51 dispatcher_host_->Send( | 43 dispatcher_host_->Send( |
| 52 new IndexedDBMsg_DatabaseCallbacksAbort( | 44 new IndexedDBMsg_DatabaseCallbacksAbort( |
| 53 ipc_thread_id_, ipc_database_id_, | 45 ipc_thread_id_, ipc_database_id_, |
| 54 dispatcher_host_->RendererTransactionId(host_transaction_id), | 46 dispatcher_host_->RendererTransactionId(host_transaction_id), |
| 55 error.code(), error.message())); | 47 error.code(), error.message())); |
| 56 } | 48 } |
| 57 | 49 |
| 58 void IndexedDBDatabaseCallbacks::onComplete(long long host_transaction_id) { | 50 void IndexedDBDatabaseCallbacks::onComplete(long long host_transaction_id) { |
| 59 dispatcher_host_->FinishTransaction(host_transaction_id, true); | 51 dispatcher_host_->FinishTransaction(host_transaction_id, true); |
| 60 dispatcher_host_->Send( | 52 dispatcher_host_->Send( |
| 61 new IndexedDBMsg_DatabaseCallbacksComplete( | 53 new IndexedDBMsg_DatabaseCallbacksComplete( |
| 62 ipc_thread_id_, ipc_database_id_, | 54 ipc_thread_id_, ipc_database_id_, |
| 63 dispatcher_host_->RendererTransactionId(host_transaction_id))); | 55 dispatcher_host_->RendererTransactionId(host_transaction_id))); |
| 64 } | 56 } |
| 65 | 57 |
| 66 } // namespace content | 58 } // namespace content |
| OLD | NEW |