| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/indexed_db/proxy_webidbdatabase_impl.h" | 5 #include "content/child/indexed_db/proxy_webidbdatabase_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "content/child/thread_safe_sender.h" | 9 #include "content/child/thread_safe_sender.h" |
| 10 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 10 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 11 #include "content/child/indexed_db/indexed_db_key_builders.h" | 11 #include "content/child/indexed_db/indexed_db_key_builders.h" |
| 12 #include "content/common/indexed_db/indexed_db_messages.h" | 12 #include "content/common/indexed_db/indexed_db_messages.h" |
| 13 #include "third_party/WebKit/public/platform/WebBlobInfo.h" |
| 13 #include "third_party/WebKit/public/platform/WebIDBKeyPath.h" | 14 #include "third_party/WebKit/public/platform/WebIDBKeyPath.h" |
| 14 #include "third_party/WebKit/public/platform/WebIDBMetadata.h" | 15 #include "third_party/WebKit/public/platform/WebIDBMetadata.h" |
| 15 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | 17 #include "third_party/WebKit/public/platform/WebVector.h" |
| 17 #include "webkit/child/worker_task_runner.h" | 18 #include "webkit/child/worker_task_runner.h" |
| 18 | 19 |
| 20 using WebKit::WebBlobInfo; |
| 19 using WebKit::WebIDBCallbacks; | 21 using WebKit::WebIDBCallbacks; |
| 20 using WebKit::WebIDBDatabaseCallbacks; | 22 using WebKit::WebIDBDatabaseCallbacks; |
| 21 using WebKit::WebIDBMetadata; | 23 using WebKit::WebIDBMetadata; |
| 22 using WebKit::WebIDBKey; | 24 using WebKit::WebIDBKey; |
| 23 using WebKit::WebIDBKeyPath; | 25 using WebKit::WebIDBKeyPath; |
| 24 using WebKit::WebIDBKeyRange; | 26 using WebKit::WebIDBKeyRange; |
| 25 using WebKit::WebString; | 27 using WebKit::WebString; |
| 26 using WebKit::WebVector; | 28 using WebKit::WebVector; |
| 27 using webkit_glue::WorkerTaskRunner; | 29 using webkit_glue::WorkerTaskRunner; |
| 28 | 30 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 index_id, | 112 index_id, |
| 111 IndexedDBKeyRangeBuilder::Build(key_range), | 113 IndexedDBKeyRangeBuilder::Build(key_range), |
| 112 key_only, | 114 key_only, |
| 113 callbacks); | 115 callbacks); |
| 114 } | 116 } |
| 115 | 117 |
| 116 void RendererWebIDBDatabaseImpl::put( | 118 void RendererWebIDBDatabaseImpl::put( |
| 117 long long transaction_id, | 119 long long transaction_id, |
| 118 long long object_store_id, | 120 long long object_store_id, |
| 119 const WebKit::WebData& value, | 121 const WebKit::WebData& value, |
| 122 const WebVector<WebBlobInfo>& webBlobInfo, |
| 120 const WebIDBKey& key, | 123 const WebIDBKey& key, |
| 121 PutMode put_mode, | 124 PutMode put_mode, |
| 122 WebIDBCallbacks* callbacks, | 125 WebIDBCallbacks* callbacks, |
| 123 const WebVector<long long>& web_index_ids, | 126 const WebVector<long long>& web_index_ids, |
| 124 const WebVector<WebIndexKeys>& web_index_keys) { | 127 const WebVector<WebIndexKeys>& web_index_keys) { |
| 125 IndexedDBDispatcher* dispatcher = | 128 IndexedDBDispatcher* dispatcher = |
| 126 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); | 129 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
| 127 dispatcher->RequestIDBDatabasePut(ipc_database_id_, | 130 dispatcher->RequestIDBDatabasePut(ipc_database_id_, |
| 128 transaction_id, | 131 transaction_id, |
| 129 object_store_id, | 132 object_store_id, |
| 130 value, | 133 value, |
| 134 webBlobInfo, |
| 131 IndexedDBKeyBuilder::Build(key), | 135 IndexedDBKeyBuilder::Build(key), |
| 132 put_mode, | 136 put_mode, |
| 133 callbacks, | 137 callbacks, |
| 134 web_index_ids, | 138 web_index_ids, |
| 135 web_index_keys); | 139 web_index_keys); |
| 136 } | 140 } |
| 137 | 141 |
| 138 void RendererWebIDBDatabaseImpl::setIndexKeys( | 142 void RendererWebIDBDatabaseImpl::setIndexKeys( |
| 139 long long transaction_id, | 143 long long transaction_id, |
| 140 long long object_store_id, | 144 long long object_store_id, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 thread_safe_sender_->Send(new IndexedDBHostMsg_DatabaseAbort( | 278 thread_safe_sender_->Send(new IndexedDBHostMsg_DatabaseAbort( |
| 275 ipc_database_id_, transaction_id)); | 279 ipc_database_id_, transaction_id)); |
| 276 } | 280 } |
| 277 | 281 |
| 278 void RendererWebIDBDatabaseImpl::commit(long long transaction_id) { | 282 void RendererWebIDBDatabaseImpl::commit(long long transaction_id) { |
| 279 thread_safe_sender_->Send(new IndexedDBHostMsg_DatabaseCommit( | 283 thread_safe_sender_->Send(new IndexedDBHostMsg_DatabaseCommit( |
| 280 ipc_database_id_, transaction_id)); | 284 ipc_database_id_, transaction_id)); |
| 281 } | 285 } |
| 282 | 286 |
| 283 } // namespace content | 287 } // namespace content |
| OLD | NEW |