| 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_callbacks.h" | 5 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" |
| 6 | 6 |
| 7 #include "content/common/indexed_db/indexed_db_messages.h" | 7 #include "content/common/indexed_db/indexed_db_messages.h" |
| 8 #include "webkit/quota/quota_manager.h" | 8 #include "webkit/quota/quota_manager.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void IndexedDBCallbacksBase::onBlocked(long long old_version) { | 32 void IndexedDBCallbacksBase::onBlocked(long long old_version) { |
| 33 dispatcher_host_->Send(new IndexedDBMsg_CallbacksIntBlocked( | 33 dispatcher_host_->Send(new IndexedDBMsg_CallbacksIntBlocked( |
| 34 thread_id_, response_id_, old_version)); | 34 thread_id_, response_id_, old_version)); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void IndexedDBCallbacksBase::onBlocked() { | 37 void IndexedDBCallbacksBase::onBlocked() { |
| 38 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(thread_id_, | 38 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(thread_id_, |
| 39 response_id_)); | 39 response_id_)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 IndexedDBCallbacksTransaction::IndexedDBCallbacksTransaction( | |
| 43 IndexedDBDispatcherHost* dispatcher_host, | |
| 44 int32 thread_id, | |
| 45 int32 response_id, | |
| 46 const GURL& origin_url) | |
| 47 : IndexedDBCallbacksBase(dispatcher_host, thread_id, response_id), | |
| 48 origin_url_(origin_url) { | |
| 49 } | |
| 50 | |
| 51 void IndexedDBCallbacksTransaction::onSuccess( | |
| 52 WebKit::WebIDBTransaction* idb_object) { | |
| 53 int32 object_id = | |
| 54 dispatcher_host()->Add(idb_object, thread_id(), origin_url_); | |
| 55 dispatcher_host()->Send( | |
| 56 new IndexedDBMsg_CallbacksSuccessIDBTransaction(thread_id(), | |
| 57 response_id(), object_id)); | |
| 58 } | |
| 59 | |
| 60 IndexedDBCallbacksDatabase::IndexedDBCallbacksDatabase( | 42 IndexedDBCallbacksDatabase::IndexedDBCallbacksDatabase( |
| 61 IndexedDBDispatcherHost* dispatcher_host, | 43 IndexedDBDispatcherHost* dispatcher_host, |
| 62 int32 thread_id, | 44 int32 thread_id, |
| 63 int32 response_id, | 45 int32 response_id, |
| 64 const GURL& origin_url) | 46 const GURL& origin_url) |
| 65 : IndexedDBCallbacksBase(dispatcher_host, thread_id, response_id), | 47 : IndexedDBCallbacksBase(dispatcher_host, thread_id, response_id), |
| 66 origin_url_(origin_url), | 48 origin_url_(origin_url), |
| 67 database_id_(kDatabaseNotAdded) { | 49 database_id_(kDatabaseNotAdded) { |
| 68 } | 50 } |
| 69 | 51 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 value)); | 194 value)); |
| 213 } | 195 } |
| 214 | 196 |
| 215 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess() { | 197 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess() { |
| 216 dispatcher_host()->Send( | 198 dispatcher_host()->Send( |
| 217 new IndexedDBMsg_CallbacksSuccessUndefined(thread_id(), | 199 new IndexedDBMsg_CallbacksSuccessUndefined(thread_id(), |
| 218 response_id())); | 200 response_id())); |
| 219 } | 201 } |
| 220 | 202 |
| 221 } // namespace content | 203 } // namespace content |
| OLD | NEW |