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 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 const string16& message); | 254 const string16& message); |
255 void OnBlocked(int32 thread_id, int32 response_id); | 255 void OnBlocked(int32 thread_id, int32 response_id); |
256 void OnIntBlocked(int32 thread_id, int32 response_id, int64 existing_version); | 256 void OnIntBlocked(int32 thread_id, int32 response_id, int64 existing_version); |
257 void OnUpgradeNeeded(int32 thread_id, | 257 void OnUpgradeNeeded(int32 thread_id, |
258 int32 response_id, | 258 int32 response_id, |
259 int32 transaction_id, | 259 int32 transaction_id, |
260 int32 database_id, | 260 int32 database_id, |
261 int64 old_version); | 261 int64 old_version); |
262 void OnAbort(int32 thread_id, int32 transaction_id); | 262 void OnAbort(int32 thread_id, int32 transaction_id); |
263 void OnComplete(int32 thread_id, int32 transaction_id); | 263 void OnComplete(int32 thread_id, int32 transaction_id); |
| 264 void OnForcedClose(int32 thread_id, int32 database_id); |
264 void OnVersionChange(int32 thread_id, | 265 void OnVersionChange(int32 thread_id, |
265 int32 database_id, | 266 int32 database_id, |
266 const string16& newVersion); | 267 const string16& newVersion); |
267 void OnIntVersionChange(int32 thread_id, | 268 void OnIntVersionChange(int32 thread_id, |
268 int32 database_id, | 269 int32 database_id, |
269 int64 old_version, | 270 int64 old_version, |
270 int64 new_version); | 271 int64 new_version); |
271 | 272 |
272 // Reset cursor prefetch caches for all cursors except exception_cursor_id. | 273 // Reset cursor prefetch caches for all cursors except exception_cursor_id. |
273 void ResetCursorPrefetchCaches(int32 exception_cursor_id = -1); | 274 void ResetCursorPrefetchCaches(int32 exception_cursor_id = -1); |
274 | 275 |
275 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be | 276 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be |
276 // destroyed and used on the same thread it was created on. | 277 // destroyed and used on the same thread it was created on. |
277 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; | 278 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; |
278 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> | 279 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> |
279 pending_transaction_callbacks_; | 280 pending_transaction_callbacks_; |
280 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> | 281 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> |
281 pending_database_callbacks_; | 282 pending_database_callbacks_; |
282 | 283 |
283 // Map from cursor id to RendererWebIDBCursorImpl. | 284 // Map from cursor id to RendererWebIDBCursorImpl. |
284 std::map<int32, RendererWebIDBCursorImpl*> cursors_; | 285 std::map<int32, RendererWebIDBCursorImpl*> cursors_; |
285 | 286 |
286 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; | 287 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; |
287 | 288 |
288 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 289 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
289 }; | 290 }; |
290 | 291 |
291 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 292 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
OLD | NEW |