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/common/indexed_db/proxy_webidbobjectstore_impl.h" | 5 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.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 "content/public/common/serialized_script_value.h" | 8 #include "content/public/common/serialized_script_value.h" |
9 #include "content/common/indexed_db/indexed_db_dispatcher.h" | 9 #include "content/common/indexed_db/indexed_db_dispatcher.h" |
10 #include "content/common/indexed_db/proxy_webidbindex_impl.h" | 10 #include "content/common/indexed_db/proxy_webidbindex_impl.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 new IndexedDBHostMsg_ObjectStoreIndexNames( | 66 new IndexedDBHostMsg_ObjectStoreIndexNames( |
67 idb_object_store_id_, &result)); | 67 idb_object_store_id_, &result)); |
68 WebDOMStringList web_result; | 68 WebDOMStringList web_result; |
69 for (std::vector<string16>::const_iterator it = result.begin(); | 69 for (std::vector<string16>::const_iterator it = result.begin(); |
70 it != result.end(); ++it) { | 70 it != result.end(); ++it) { |
71 web_result.append(*it); | 71 web_result.append(*it); |
72 } | 72 } |
73 return web_result; | 73 return web_result; |
74 } | 74 } |
75 | 75 |
| 76 bool RendererWebIDBObjectStoreImpl::autoIncrement() const { |
| 77 bool result; |
| 78 IndexedDBDispatcher::Send( |
| 79 new IndexedDBHostMsg_ObjectStoreAutoIncrement( |
| 80 idb_object_store_id_, &result)); |
| 81 return result; |
| 82 } |
| 83 |
76 void RendererWebIDBObjectStoreImpl::get( | 84 void RendererWebIDBObjectStoreImpl::get( |
77 const WebIDBKeyRange& key_range, | 85 const WebIDBKeyRange& key_range, |
78 WebIDBCallbacks* callbacks, | 86 WebIDBCallbacks* callbacks, |
79 const WebIDBTransaction& transaction, | 87 const WebIDBTransaction& transaction, |
80 WebExceptionCode& ec) { | 88 WebExceptionCode& ec) { |
81 IndexedDBDispatcher* dispatcher = | 89 IndexedDBDispatcher* dispatcher = |
82 IndexedDBDispatcher::ThreadSpecificInstance(); | 90 IndexedDBDispatcher::ThreadSpecificInstance(); |
83 dispatcher->RequestIDBObjectStoreGet( | 91 dispatcher->RequestIDBObjectStoreGet( |
84 content::IndexedDBKeyRange(key_range), callbacks, | 92 content::IndexedDBKeyRange(key_range), callbacks, |
85 idb_object_store_id_, transaction, &ec); | 93 idb_object_store_id_, transaction, &ec); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const WebIDBKeyRange& idb_key_range, | 202 const WebIDBKeyRange& idb_key_range, |
195 WebIDBCallbacks* callbacks, | 203 WebIDBCallbacks* callbacks, |
196 const WebIDBTransaction& transaction, | 204 const WebIDBTransaction& transaction, |
197 WebExceptionCode& ec) { | 205 WebExceptionCode& ec) { |
198 IndexedDBDispatcher* dispatcher = | 206 IndexedDBDispatcher* dispatcher = |
199 IndexedDBDispatcher::ThreadSpecificInstance(); | 207 IndexedDBDispatcher::ThreadSpecificInstance(); |
200 dispatcher->RequestIDBObjectStoreCount( | 208 dispatcher->RequestIDBObjectStoreCount( |
201 idb_key_range, callbacks, idb_object_store_id_, | 209 idb_key_range, callbacks, idb_object_store_id_, |
202 transaction, &ec); | 210 transaction, &ec); |
203 } | 211 } |
OLD | NEW |