| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_callbacks.h" | 5 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" |
| 6 | 6 |
| 7 #include "content/common/indexed_db_messages.h" | 7 #include "content/common/indexed_db_messages.h" |
| 8 #include "webkit/quota/quota_manager.h" | 8 #include "webkit/quota/quota_manager.h" |
| 9 | 9 |
| 10 IndexedDBCallbacksBase::IndexedDBCallbacksBase( | 10 IndexedDBCallbacksBase::IndexedDBCallbacksBase( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 response_id_, error.code(), error.message())); | 21 response_id_, error.code(), error.message())); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void IndexedDBCallbacksBase::onBlocked() { | 24 void IndexedDBCallbacksBase::onBlocked() { |
| 25 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(response_id_)); | 25 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(response_id_)); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( | 28 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( |
| 29 WebKit::WebIDBCursor* idb_object) { | 29 WebKit::WebIDBCursor* idb_object) { |
| 30 int32 object_id = dispatcher_host()->Add(idb_object); | 30 int32 object_id = dispatcher_host()->Add(idb_object); |
| 31 dispatcher_host()->Send( | 31 dispatcher_host()->Send(new IndexedDBMsg_CallbacksSuccessIDBCursor( |
| 32 new IndexedDBMsg_CallbacksSuccessIDBCursor(response_id(), object_id)); | 32 response_id(), object_id, IndexedDBKey(idb_object->key()), |
| 33 IndexedDBKey(idb_object->primaryKey()), |
| 34 SerializedScriptValue(idb_object->value()))); |
| 33 } | 35 } |
| 34 | 36 |
| 35 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( | 37 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( |
| 36 const WebKit::WebSerializedScriptValue& value) { | 38 const WebKit::WebSerializedScriptValue& value) { |
| 37 dispatcher_host()->Send( | 39 dispatcher_host()->Send( |
| 38 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( | 40 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( |
| 39 response_id(), SerializedScriptValue(value))); | 41 response_id(), SerializedScriptValue(value))); |
| 40 } | 42 } |
| 41 | 43 |
| 42 void IndexedDBCallbacks<WebKit::WebIDBKey>::onSuccess( | 44 void IndexedDBCallbacks<WebKit::WebIDBKey>::onSuccess( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 new IndexedDBMsg_CallbacksSuccessStringList( | 59 new IndexedDBMsg_CallbacksSuccessStringList( |
| 58 response_id(), list)); | 60 response_id(), list)); |
| 59 } | 61 } |
| 60 | 62 |
| 61 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( | 63 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( |
| 62 const WebKit::WebSerializedScriptValue& value) { | 64 const WebKit::WebSerializedScriptValue& value) { |
| 63 dispatcher_host()->Send( | 65 dispatcher_host()->Send( |
| 64 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( | 66 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( |
| 65 response_id(), SerializedScriptValue(value))); | 67 response_id(), SerializedScriptValue(value))); |
| 66 } | 68 } |
| OLD | NEW |