| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 void CursorDestroyed(int32 cursor_id); | 210 void CursorDestroyed(int32 cursor_id); |
| 211 void DatabaseDestroyed(int32 database_id); | 211 void DatabaseDestroyed(int32 database_id); |
| 212 | 212 |
| 213 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); | 213 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest); | 216 FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest); |
| 217 | 217 |
| 218 // IDBCallback message handlers. | 218 // IDBCallback message handlers. |
| 219 void OnSuccessNull(int32 response_id); | |
| 220 void OnSuccessIDBDatabase(int32 thread_id, | 219 void OnSuccessIDBDatabase(int32 thread_id, |
| 221 int32 response_id, | 220 int32 response_id, |
| 222 int32 object_id); | 221 int32 object_id); |
| 222 void OnSuccessIDBDatabaseDeleted(int32 thread_id, |
| 223 int32 response_id, |
| 224 int32 object_id); |
| 223 void OnSuccessIndexedDBKey(int32 thread_id, | 225 void OnSuccessIndexedDBKey(int32 thread_id, |
| 224 int32 response_id, | 226 int32 response_id, |
| 225 const content::IndexedDBKey& key); | 227 const content::IndexedDBKey& key); |
| 226 void OnSuccessIDBTransaction(int32 thread_id, | 228 void OnSuccessIDBTransaction(int32 thread_id, |
| 227 int32 response_id, | 229 int32 response_id, |
| 228 int32 object_id); | 230 int32 object_id); |
| 229 void OnSuccessOpenCursor( | 231 void OnSuccessOpenCursor( |
| 230 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); | 232 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); |
| 231 void OnSuccessCursorContinue( | 233 void OnSuccessCursorContinue( |
| 232 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); | 234 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); |
| 233 void OnSuccessCursorPrefetch( | 235 void OnSuccessCursorPrefetch( |
| 234 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); | 236 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); |
| 235 void OnSuccessStringList(int32 thread_id, | 237 void OnSuccessStringList(int32 thread_id, |
| 236 int32 response_id, | 238 int32 response_id, |
| 237 const std::vector<string16>& value); | 239 const std::vector<string16>& value); |
| 238 void OnSuccessSerializedScriptValue( | 240 void OnSuccessSerializedScriptValue( |
| 239 int32 thread_id, | 241 int32 thread_id, |
| 240 int32 response_id, | 242 int32 response_id, |
| 241 const content::SerializedScriptValue& value); | 243 const content::SerializedScriptValue& value); |
| 242 void OnSuccessSerializedScriptValueWithKey( | 244 void OnSuccessSerializedScriptValueWithKey( |
| 243 int32 thread_id, | 245 int32 thread_id, |
| 244 int32 response_id, | 246 int32 response_id, |
| 245 const content::SerializedScriptValue& value, | 247 const content::SerializedScriptValue& value, |
| 246 const content::IndexedDBKey& primary_key, | 248 const content::IndexedDBKey& primary_key, |
| 247 const content::IndexedDBKeyPath& key_path); | 249 const content::IndexedDBKeyPath& key_path); |
| 250 void OnSuccessInteger( |
| 251 int32 thread_id, |
| 252 int32 response_id, |
| 253 int64 value); |
| 254 void OnSuccessUndefined( |
| 255 int32 thread_id, |
| 256 int32 response_id); |
| 248 void OnError(int32 thread_id, | 257 void OnError(int32 thread_id, |
| 249 int32 response_id, | 258 int32 response_id, |
| 250 int code, | 259 int code, |
| 251 const string16& message); | 260 const string16& message); |
| 252 void OnBlocked(int32 thread_id, int32 response_id); | 261 void OnBlocked(int32 thread_id, int32 response_id); |
| 253 void OnIntBlocked(int32 thread_id, int32 response_id, int64 existing_version); | 262 void OnIntBlocked(int32 thread_id, int32 response_id, int64 existing_version); |
| 254 void OnUpgradeNeeded(int32 thread_id, | 263 void OnUpgradeNeeded(int32 thread_id, |
| 255 int32 response_id, | 264 int32 response_id, |
| 256 int32 transaction_id, | 265 int32 transaction_id, |
| 257 int32 database_id, | 266 int32 database_id, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 285 | 294 |
| 286 // Map from cursor id to RendererWebIDBCursorImpl. | 295 // Map from cursor id to RendererWebIDBCursorImpl. |
| 287 std::map<int32, RendererWebIDBCursorImpl*> cursors_; | 296 std::map<int32, RendererWebIDBCursorImpl*> cursors_; |
| 288 | 297 |
| 289 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; | 298 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; |
| 290 | 299 |
| 291 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 300 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 292 }; | 301 }; |
| 293 | 302 |
| 294 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 303 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |