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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "content/common/indexed_db/indexed_db_messages.h" | 9 #include "content/common/indexed_db/indexed_db_messages.h" |
10 #include "content/public/common/serialized_script_value.h" | 10 #include "content/public/common/serialized_script_value.h" |
11 #include "content/common/indexed_db/indexed_db_dispatcher.h" | 11 #include "content/common/indexed_db/indexed_db_dispatcher.h" |
12 #include "content/common/indexed_db/proxy_webidbindex_impl.h" | 12 #include "content/common/indexed_db/proxy_webidbindex_impl.h" |
13 #include "content/common/indexed_db/proxy_webidbtransaction_impl.h" | 13 #include "content/common/indexed_db/proxy_webidbtransaction_impl.h" |
14 #include "content/common/child_thread.h" | 14 #include "content/common/child_thread.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
22 | 22 |
23 using content::IndexedDBKey; | |
24 using content::IndexedDBKeyPath; | |
25 using content::IndexedDBKeyRange; | |
26 using content::SerializedScriptValue; | 23 using content::SerializedScriptValue; |
27 using WebKit::WebDOMStringList; | 24 using WebKit::WebDOMStringList; |
28 using WebKit::WebExceptionCode; | 25 using WebKit::WebExceptionCode; |
29 using WebKit::WebFrame; | 26 using WebKit::WebFrame; |
30 using WebKit::WebIDBCallbacks; | 27 using WebKit::WebIDBCallbacks; |
31 using WebKit::WebIDBKeyPath; | 28 using WebKit::WebIDBKeyPath; |
32 using WebKit::WebIDBKeyRange; | 29 using WebKit::WebIDBKeyRange; |
33 using WebKit::WebIDBIndex; | 30 using WebKit::WebIDBIndex; |
34 using WebKit::WebIDBKey; | 31 using WebKit::WebIDBKey; |
35 using WebKit::WebIDBTransaction; | 32 using WebKit::WebIDBTransaction; |
36 using WebKit::WebSerializedScriptValue; | 33 using WebKit::WebSerializedScriptValue; |
37 using WebKit::WebString; | 34 using WebKit::WebString; |
38 using WebKit::WebVector; | 35 using WebKit::WebVector; |
39 | 36 |
| 37 namespace content { |
| 38 |
40 RendererWebIDBObjectStoreImpl::RendererWebIDBObjectStoreImpl( | 39 RendererWebIDBObjectStoreImpl::RendererWebIDBObjectStoreImpl( |
41 int32 idb_object_store_id) | 40 int32 idb_object_store_id) |
42 : idb_object_store_id_(idb_object_store_id) { | 41 : idb_object_store_id_(idb_object_store_id) { |
43 } | 42 } |
44 | 43 |
45 RendererWebIDBObjectStoreImpl::~RendererWebIDBObjectStoreImpl() { | 44 RendererWebIDBObjectStoreImpl::~RendererWebIDBObjectStoreImpl() { |
46 // It's not possible for there to be pending callbacks that address this | 45 // It's not possible for there to be pending callbacks that address this |
47 // object since inside WebKit, they hold a reference to the object wich owns | 46 // object since inside WebKit, they hold a reference to the object wich owns |
48 // this object. But, if that ever changed, then we'd need to invalidate | 47 // this object. But, if that ever changed, then we'd need to invalidate |
49 // any such pointers. | 48 // any such pointers. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 const WebIDBKeyRange& idb_key_range, | 206 const WebIDBKeyRange& idb_key_range, |
208 WebIDBCallbacks* callbacks, | 207 WebIDBCallbacks* callbacks, |
209 const WebIDBTransaction& transaction, | 208 const WebIDBTransaction& transaction, |
210 WebExceptionCode& ec) { | 209 WebExceptionCode& ec) { |
211 IndexedDBDispatcher* dispatcher = | 210 IndexedDBDispatcher* dispatcher = |
212 IndexedDBDispatcher::ThreadSpecificInstance(); | 211 IndexedDBDispatcher::ThreadSpecificInstance(); |
213 dispatcher->RequestIDBObjectStoreCount( | 212 dispatcher->RequestIDBObjectStoreCount( |
214 idb_key_range, callbacks, idb_object_store_id_, | 213 idb_key_range, callbacks, idb_object_store_id_, |
215 transaction, &ec); | 214 transaction, &ec); |
216 } | 215 } |
| 216 |
| 217 } // namespace content |
OLD | NEW |