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 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
12 #include "base/nullable_string16.h" | 12 #include "base/nullable_string16.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "ipc/ipc_sync_message_filter.h" | 14 #include "ipc/ipc_sync_message_filter.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h" | |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac ks.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac ks.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" | |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall backs.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall backs.h" |
21 #include "webkit/glue/worker_task_runner.h" | 23 #include "webkit/glue/worker_task_runner.h" |
22 | 24 |
23 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; | 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; |
24 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; | 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; |
25 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; | 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; |
26 class RendererWebIDBCursorImpl; | 28 class RendererWebIDBCursorImpl; |
27 class RendererWebIDBDatabaseImpl; | 29 class RendererWebIDBDatabaseImpl; |
28 | 30 |
29 namespace IPC { | 31 namespace IPC { |
30 class Message; | 32 class Message; |
31 } | 33 } |
32 | 34 |
33 namespace WebKit { | 35 namespace WebKit { |
34 class WebFrame; | 36 class WebFrame; |
35 class WebIDBKeyRange; | 37 class WebIDBKeyRange; |
36 class WebIDBTransaction; | |
37 } | 38 } |
38 | 39 |
39 namespace content { | 40 namespace content { |
40 class IndexedDBKey; | 41 class IndexedDBKey; |
41 class IndexedDBKeyPath; | 42 class IndexedDBKeyPath; |
42 class IndexedDBKeyRange; | 43 class IndexedDBKeyRange; |
43 class SerializedScriptValue; | 44 class SerializedScriptValue; |
44 } | 45 } |
45 | 46 |
46 CONTENT_EXPORT extern const size_t kMaxIDBValueSizeInBytes; | 47 CONTENT_EXPORT extern const size_t kMaxIDBValueSizeInBytes; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 const content::SerializedScriptValue& value, | 170 const content::SerializedScriptValue& value, |
170 const content::IndexedDBKey& key, | 171 const content::IndexedDBKey& key, |
171 WebKit::WebIDBObjectStore::PutMode putMode, | 172 WebKit::WebIDBObjectStore::PutMode putMode, |
172 WebKit::WebIDBCallbacks* callbacks, | 173 WebKit::WebIDBCallbacks* callbacks, |
173 int32 idb_object_store_id, | 174 int32 idb_object_store_id, |
174 const WebKit::WebIDBTransaction& transaction, | 175 const WebKit::WebIDBTransaction& transaction, |
175 const WebKit::WebVector<WebKit::WebString>& indexNames, | 176 const WebKit::WebVector<WebKit::WebString>& indexNames, |
176 const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& indexKeys, | 177 const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& indexKeys, |
177 WebKit::WebExceptionCode* ec); | 178 WebKit::WebExceptionCode* ec); |
178 | 179 |
180 void RequestIDBObjectStoreSetIndexKeys( | |
181 int32 idb_object_store_id, | |
182 const content::IndexedDBKey& primaryKey, | |
183 const WebKit::WebVector<WebKit::WebString>& indexNames, | |
184 const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& indexKeys, | |
185 const WebKit::WebIDBTransaction& transaction); | |
186 | |
187 void RequestIDBObjectStoreSetIndexesReady( | |
188 int32 idb_object_store_id, | |
189 const WebKit::WebVector<WebKit::WebString>& indexNames, | |
190 const WebKit::WebIDBTransaction& transaction); | |
191 | |
179 void RequestIDBObjectStoreDelete( | 192 void RequestIDBObjectStoreDelete( |
180 const content::IndexedDBKeyRange& key_range, | 193 const content::IndexedDBKeyRange& key_range, |
181 WebKit::WebIDBCallbacks* callbacks, | 194 WebKit::WebIDBCallbacks* callbacks, |
182 int32 idb_object_store_id, | 195 int32 idb_object_store_id, |
183 const WebKit::WebIDBTransaction& transaction, | 196 const WebKit::WebIDBTransaction& transaction, |
184 WebKit::WebExceptionCode* ec); | 197 WebKit::WebExceptionCode* ec); |
185 | 198 |
186 void RequestIDBObjectStoreClear( | 199 void RequestIDBObjectStoreClear( |
187 WebKit::WebIDBCallbacks* callbacks, | 200 WebKit::WebIDBCallbacks* callbacks, |
188 int32 idb_object_store_id, | 201 int32 idb_object_store_id, |
189 const WebKit::WebIDBTransaction& transaction, | 202 const WebKit::WebIDBTransaction& transaction, |
190 WebKit::WebExceptionCode* ec); | 203 WebKit::WebExceptionCode* ec); |
191 | 204 |
192 void RequestIDBObjectStoreOpenCursor( | 205 void RequestIDBObjectStoreOpenCursor( |
193 const WebKit::WebIDBKeyRange& idb_key_range, | 206 const WebKit::WebIDBKeyRange& idb_key_range, |
194 unsigned short direction, | 207 WebKit::WebIDBCursor::Direction direction, |
jsbell
2012/08/08 23:34:08
Just a reminder to add the WebIDBCursor::Direction
alecflett
2012/08/09 20:54:18
good point! https://bugs.webkit.org/show_bug.cgi?i
| |
195 WebKit::WebIDBCallbacks* callbacks, | 208 WebKit::WebIDBCallbacks* callbacks, |
196 int32 idb_object_store_id, | 209 int32 idb_object_store_id, |
210 WebKit::WebIDBTransaction::TaskType task_type, | |
197 const WebKit::WebIDBTransaction& transaction, | 211 const WebKit::WebIDBTransaction& transaction, |
198 WebKit::WebExceptionCode* ec); | 212 WebKit::WebExceptionCode* ec); |
199 | 213 |
200 void RequestIDBObjectStoreCount( | 214 void RequestIDBObjectStoreCount( |
201 const WebKit::WebIDBKeyRange& idb_key_range, | 215 const WebKit::WebIDBKeyRange& idb_key_range, |
202 WebKit::WebIDBCallbacks* callbacks, | 216 WebKit::WebIDBCallbacks* callbacks, |
203 int32 idb_object_store_id, | 217 int32 idb_object_store_id, |
204 const WebKit::WebIDBTransaction& transaction, | 218 const WebKit::WebIDBTransaction& transaction, |
205 WebKit::WebExceptionCode* ec); | 219 WebKit::WebExceptionCode* ec); |
206 | 220 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 | 294 |
281 // Map from cursor id to RendererWebIDBCursorImpl. | 295 // Map from cursor id to RendererWebIDBCursorImpl. |
282 std::map<int32, RendererWebIDBCursorImpl*> cursors_; | 296 std::map<int32, RendererWebIDBCursorImpl*> cursors_; |
283 | 297 |
284 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; | 298 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; |
285 | 299 |
286 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 300 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
287 }; | 301 }; |
288 | 302 |
289 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 303 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
OLD | NEW |