| 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/renderer/renderer_webidbobjectstore_impl.h" | 5 #include "content/renderer/renderer_webidbobjectstore_impl.h" |
| 6 | 6 |
| 7 #include "content/common/indexed_db_messages.h" | 7 #include "content/common/indexed_db_messages.h" |
| 8 #include "content/public/common/serialized_script_value.h" | 8 #include "content/public/common/serialized_script_value.h" |
| 9 #include "content/renderer/indexed_db_dispatcher.h" | 9 #include "content/renderer/indexed_db_dispatcher.h" |
| 10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 IndexedDBDispatcher* dispatcher = | 112 IndexedDBDispatcher* dispatcher = |
| 113 RenderThreadImpl::current()->indexed_db_dispatcher(); | 113 RenderThreadImpl::current()->indexed_db_dispatcher(); |
| 114 dispatcher->RequestIDBObjectStoreClear( | 114 dispatcher->RequestIDBObjectStoreClear( |
| 115 callbacks, idb_object_store_id_, transaction, &ec); | 115 callbacks, idb_object_store_id_, transaction, &ec); |
| 116 } | 116 } |
| 117 | 117 |
| 118 WebIDBIndex* RendererWebIDBObjectStoreImpl::createIndex( | 118 WebIDBIndex* RendererWebIDBObjectStoreImpl::createIndex( |
| 119 const WebString& name, | 119 const WebString& name, |
| 120 const WebString& key_path, | 120 const WebString& key_path, |
| 121 bool unique, | 121 bool unique, |
| 122 bool multi_entry, |
| 122 const WebIDBTransaction& transaction, | 123 const WebIDBTransaction& transaction, |
| 123 WebExceptionCode& ec) { | 124 WebExceptionCode& ec) { |
| 124 IndexedDBHostMsg_ObjectStoreCreateIndex_Params params; | 125 IndexedDBHostMsg_ObjectStoreCreateIndex_Params params; |
| 125 params.name = name; | 126 params.name = name; |
| 126 params.key_path = key_path; | 127 params.key_path = key_path; |
| 127 params.unique = unique; | 128 params.unique = unique; |
| 129 params.multi_entry = multi_entry; |
| 128 params.transaction_id = IndexedDBDispatcher::TransactionId(transaction); | 130 params.transaction_id = IndexedDBDispatcher::TransactionId(transaction); |
| 129 params.idb_object_store_id = idb_object_store_id_; | 131 params.idb_object_store_id = idb_object_store_id_; |
| 130 | 132 |
| 131 int32 index_id; | 133 int32 index_id; |
| 132 ChildThread::current()->Send( | 134 ChildThread::current()->Send( |
| 133 new IndexedDBHostMsg_ObjectStoreCreateIndex(params, &index_id, &ec)); | 135 new IndexedDBHostMsg_ObjectStoreCreateIndex(params, &index_id, &ec)); |
| 134 if (!index_id) | 136 if (!index_id) |
| 135 return NULL; | 137 return NULL; |
| 136 return new RendererWebIDBIndexImpl(index_id); | 138 return new RendererWebIDBIndexImpl(index_id); |
| 137 } | 139 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 162 const WebIDBKeyRange& idb_key_range, | 164 const WebIDBKeyRange& idb_key_range, |
| 163 unsigned short direction, WebIDBCallbacks* callbacks, | 165 unsigned short direction, WebIDBCallbacks* callbacks, |
| 164 const WebIDBTransaction& transaction, | 166 const WebIDBTransaction& transaction, |
| 165 WebExceptionCode& ec) { | 167 WebExceptionCode& ec) { |
| 166 IndexedDBDispatcher* dispatcher = | 168 IndexedDBDispatcher* dispatcher = |
| 167 RenderThreadImpl::current()->indexed_db_dispatcher(); | 169 RenderThreadImpl::current()->indexed_db_dispatcher(); |
| 168 dispatcher->RequestIDBObjectStoreOpenCursor( | 170 dispatcher->RequestIDBObjectStoreOpenCursor( |
| 169 idb_key_range, direction, callbacks, idb_object_store_id_, | 171 idb_key_range, direction, callbacks, idb_object_store_id_, |
| 170 transaction, &ec); | 172 transaction, &ec); |
| 171 } | 173 } |
| OLD | NEW |