| 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/WebIDBCursor.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac
ks.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac
ks.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/WebIDBTransaction.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall
backs.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall
backs.h" |
| 23 #include "webkit/glue/worker_task_runner.h" | 22 #include "webkit/glue/worker_task_runner.h" |
| 24 | 23 |
| 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; | 24 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; |
| 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; | 25 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; |
| 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; | 26 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; |
| 28 | 27 |
| 29 namespace WebKit { | 28 namespace WebKit { |
| 30 class WebFrame; | 29 class WebFrame; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 int64 object_store_id, | 162 int64 object_store_id, |
| 164 const IndexedDBKeyRange& key_range, | 163 const IndexedDBKeyRange& key_range, |
| 165 WebKit::WebIDBCallbacks* callbacks); | 164 WebKit::WebIDBCallbacks* callbacks); |
| 166 | 165 |
| 167 void RequestIDBDatabaseClear( | 166 void RequestIDBDatabaseClear( |
| 168 int32 ipc_database_id, | 167 int32 ipc_database_id, |
| 169 int64 transaction_id, | 168 int64 transaction_id, |
| 170 int64 object_store_id, | 169 int64 object_store_id, |
| 171 WebKit::WebIDBCallbacks* callbacks); | 170 WebKit::WebIDBCallbacks* callbacks); |
| 172 | 171 |
| 173 void RequestIDBIndexOpenObjectCursor( | |
| 174 const WebKit::WebIDBKeyRange& idb_key_range, | |
| 175 unsigned short direction, | |
| 176 WebKit::WebIDBCallbacks* callbacks, | |
| 177 int32 ipc_index_id, | |
| 178 const WebKit::WebIDBTransaction& transaction, | |
| 179 WebKit::WebExceptionCode* ec); | |
| 180 | |
| 181 void RequestIDBIndexOpenKeyCursor( | |
| 182 const WebKit::WebIDBKeyRange& idb_key_range, | |
| 183 unsigned short direction, | |
| 184 WebKit::WebIDBCallbacks* callbacks, | |
| 185 int32 ipc_index_id, | |
| 186 const WebKit::WebIDBTransaction& transaction, | |
| 187 WebKit::WebExceptionCode* ec); | |
| 188 | |
| 189 void RequestIDBIndexCount( | |
| 190 const WebKit::WebIDBKeyRange& idb_key_range, | |
| 191 WebKit::WebIDBCallbacks* callbacks, | |
| 192 int32 ipc_index_id, | |
| 193 const WebKit::WebIDBTransaction& transaction, | |
| 194 WebKit::WebExceptionCode* ec); | |
| 195 | |
| 196 void RequestIDBIndexGetObject( | |
| 197 const IndexedDBKeyRange& key_range, | |
| 198 WebKit::WebIDBCallbacks* callbacks, | |
| 199 int32 ipc_index_id, | |
| 200 const WebKit::WebIDBTransaction& transaction, | |
| 201 WebKit::WebExceptionCode* ec); | |
| 202 | |
| 203 void RequestIDBIndexGetKey( | |
| 204 const IndexedDBKeyRange& key_range, | |
| 205 WebKit::WebIDBCallbacks* callbacks, | |
| 206 int32 ipc_index_id, | |
| 207 const WebKit::WebIDBTransaction& transaction, | |
| 208 WebKit::WebExceptionCode* ec); | |
| 209 | |
| 210 void RequestIDBObjectStoreGet( | |
| 211 const IndexedDBKeyRange& key_range, | |
| 212 WebKit::WebIDBCallbacks* callbacks, | |
| 213 int32 ipc_object_store_id, | |
| 214 const WebKit::WebIDBTransaction& transaction, | |
| 215 WebKit::WebExceptionCode* ec); | |
| 216 | |
| 217 void RequestIDBObjectStorePut( | |
| 218 const SerializedScriptValue& value, | |
| 219 const IndexedDBKey& key, | |
| 220 WebKit::WebIDBObjectStore::PutMode putMode, | |
| 221 WebKit::WebIDBCallbacks* callbacks, | |
| 222 int32 ipc_object_store_id, | |
| 223 const WebKit::WebIDBTransaction& transaction, | |
| 224 const WebKit::WebVector<long long>& indexIds, | |
| 225 const WebKit::WebVector<WebKit::WebVector< | |
| 226 WebKit::WebIDBKey> >& indexKeys); | |
| 227 | |
| 228 void RequestIDBObjectStoreDelete( | |
| 229 const IndexedDBKeyRange& key_range, | |
| 230 WebKit::WebIDBCallbacks* callbacks, | |
| 231 int32 ipc_object_store_id, | |
| 232 const WebKit::WebIDBTransaction& transaction, | |
| 233 WebKit::WebExceptionCode* ec); | |
| 234 | |
| 235 void RequestIDBObjectStoreClear( | |
| 236 WebKit::WebIDBCallbacks* callbacks, | |
| 237 int32 ipc_object_store_id, | |
| 238 const WebKit::WebIDBTransaction& transaction, | |
| 239 WebKit::WebExceptionCode* ec); | |
| 240 | |
| 241 void RequestIDBObjectStoreOpenCursor( | |
| 242 const WebKit::WebIDBKeyRange& idb_key_range, | |
| 243 WebKit::WebIDBCursor::Direction direction, | |
| 244 WebKit::WebIDBCallbacks* callbacks, | |
| 245 int32 ipc_object_store_id, | |
| 246 WebKit::WebIDBTransaction::TaskType task_type, | |
| 247 const WebKit::WebIDBTransaction& transaction, | |
| 248 WebKit::WebExceptionCode* ec); | |
| 249 | |
| 250 void RequestIDBObjectStoreCount( | |
| 251 const WebKit::WebIDBKeyRange& idb_key_range, | |
| 252 WebKit::WebIDBCallbacks* callbacks, | |
| 253 int32 ipc_object_store_id, | |
| 254 const WebKit::WebIDBTransaction& transaction, | |
| 255 WebKit::WebExceptionCode* ec); | |
| 256 | |
| 257 void RegisterWebIDBTransactionCallbacks( | 172 void RegisterWebIDBTransactionCallbacks( |
| 258 WebKit::WebIDBTransactionCallbacks* callbacks, | 173 WebKit::WebIDBTransactionCallbacks* callbacks, |
| 259 int32 id); | 174 int32 id); |
| 260 | 175 |
| 261 void CursorDestroyed(int32 ipc_cursor_id); | 176 void CursorDestroyed(int32 ipc_cursor_id); |
| 262 void DatabaseDestroyed(int32 ipc_database_id); | 177 void DatabaseDestroyed(int32 ipc_database_id); |
| 263 | 178 |
| 264 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); | 179 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); |
| 265 | 180 |
| 266 private: | 181 private: |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 std::map<int32, RendererWebIDBCursorImpl*> cursors_; | 266 std::map<int32, RendererWebIDBCursorImpl*> cursors_; |
| 352 | 267 |
| 353 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; | 268 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; |
| 354 | 269 |
| 355 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 270 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 356 }; | 271 }; |
| 357 | 272 |
| 358 } // namespace content | 273 } // namespace content |
| 359 | 274 |
| 360 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 275 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |