| 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 19 matching lines...) Expand all Loading... |
| 30 int32 object_id = dispatcher_host()->Add(idb_object, origin_url()); | 30 int32 object_id = dispatcher_host()->Add(idb_object, origin_url()); |
| 31 if (dispatcher_host()->Context()->quota_manager_proxy()) { | 31 if (dispatcher_host()->Context()->quota_manager_proxy()) { |
| 32 dispatcher_host()->Context()->quota_manager_proxy()->NotifyStorageAccessed( | 32 dispatcher_host()->Context()->quota_manager_proxy()->NotifyStorageAccessed( |
| 33 quota::QuotaClient::kIndexedDatabase, origin_url(), | 33 quota::QuotaClient::kIndexedDatabase, origin_url(), |
| 34 quota::kStorageTypeTemporary); | 34 quota::kStorageTypeTemporary); |
| 35 } | 35 } |
| 36 dispatcher_host()->Send( | 36 dispatcher_host()->Send( |
| 37 new IndexedDBMsg_CallbacksSuccessIDBDatabase(response_id(), object_id)); | 37 new IndexedDBMsg_CallbacksSuccessIDBDatabase(response_id(), object_id)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void IndexedDBCallbacks<WebKit::WebIDBTransaction>::onSuccess( |
| 41 WebKit::WebIDBTransaction* idb_object) { |
| 42 int32 object_id = dispatcher_host()->Add(idb_object, origin_url()); |
| 43 dispatcher_host()->Send( |
| 44 new IndexedDBMsg_CallbacksSuccessIDBTransaction(response_id(), |
| 45 object_id)); |
| 46 } |
| 47 |
| 40 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( | 48 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( |
| 41 WebKit::WebIDBCursor* idb_object) { | 49 WebKit::WebIDBCursor* idb_object) { |
| 42 int32 object_id = dispatcher_host()->Add(idb_object); | 50 int32 object_id = dispatcher_host()->Add(idb_object); |
| 43 dispatcher_host()->Send( | 51 dispatcher_host()->Send( |
| 44 new IndexedDBMsg_CallbacksSuccessIDBCursor(response_id(), object_id)); | 52 new IndexedDBMsg_CallbacksSuccessIDBCursor(response_id(), object_id)); |
| 45 } | 53 } |
| 46 | 54 |
| 47 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( | 55 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( |
| 48 const WebKit::WebSerializedScriptValue& value) { | 56 const WebKit::WebSerializedScriptValue& value) { |
| 49 dispatcher_host()->Send( | 57 dispatcher_host()->Send( |
| 50 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( | 58 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( |
| 51 response_id(), SerializedScriptValue(value))); | 59 response_id(), SerializedScriptValue(value))); |
| 52 } | 60 } |
| 53 | 61 |
| 54 void IndexedDBCallbacks<WebKit::WebIDBKey>::onSuccess( | 62 void IndexedDBCallbacks<WebKit::WebIDBKey>::onSuccess( |
| 55 const WebKit::WebIDBKey& value) { | 63 const WebKit::WebIDBKey& value) { |
| 56 dispatcher_host()->Send( | 64 dispatcher_host()->Send( |
| 57 new IndexedDBMsg_CallbacksSuccessIndexedDBKey( | 65 new IndexedDBMsg_CallbacksSuccessIndexedDBKey( |
| 58 response_id(), IndexedDBKey(value))); | 66 response_id(), IndexedDBKey(value))); |
| 59 } | 67 } |
| 60 | 68 |
| 61 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( | 69 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( |
| 62 const WebKit::WebSerializedScriptValue& value) { | 70 const WebKit::WebSerializedScriptValue& value) { |
| 63 dispatcher_host()->Send( | 71 dispatcher_host()->Send( |
| 64 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( | 72 new IndexedDBMsg_CallbacksSuccessSerializedScriptValue( |
| 65 response_id(), SerializedScriptValue(value))); | 73 response_id(), SerializedScriptValue(value))); |
| 66 } | 74 } |
| OLD | NEW |