| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_INDEXED_DB_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_INDEXED_DB_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_INDEXED_DB_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_INDEXED_DB_DISPATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/nullable_string16.h" | 10 #include "base/nullable_string16.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 int32 id); | 144 int32 id); |
| 145 | 145 |
| 146 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); | 146 static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 // IDBCallback message handlers. | 149 // IDBCallback message handlers. |
| 150 void OnSuccessNull(int32 response_id); | 150 void OnSuccessNull(int32 response_id); |
| 151 void OnSuccessIDBDatabase(int32 response_id, int32 object_id); | 151 void OnSuccessIDBDatabase(int32 response_id, int32 object_id); |
| 152 void OnSuccessIndexedDBKey(int32 response_id, const IndexedDBKey& key); | 152 void OnSuccessIndexedDBKey(int32 response_id, const IndexedDBKey& key); |
| 153 void OnSuccessIDBTransaction(int32 response_id, int32 object_id); | 153 void OnSuccessIDBTransaction(int32 response_id, int32 object_id); |
| 154 void OnSuccessIDBIndex(int32 response_id, int32 object_id); | |
| 155 void OnSuccessOpenCursor(int32 response_id, int32 object_id); | 154 void OnSuccessOpenCursor(int32 response_id, int32 object_id); |
| 156 void OnSuccessSerializedScriptValue(int32 response_id, | 155 void OnSuccessSerializedScriptValue(int32 response_id, |
| 157 const SerializedScriptValue& value); | 156 const SerializedScriptValue& value); |
| 158 void OnError(int32 response_id, int code, const string16& message); | 157 void OnError(int32 response_id, int code, const string16& message); |
| 159 void OnBlocked(int32 response_id); | 158 void OnBlocked(int32 response_id); |
| 160 void OnAbort(int32 transaction_id); | 159 void OnAbort(int32 transaction_id); |
| 161 void OnComplete(int32 transaction_id); | 160 void OnComplete(int32 transaction_id); |
| 162 void OnVersionChange(int32 database_id, const string16& newVersion); | 161 void OnVersionChange(int32 database_id, const string16& newVersion); |
| 163 | 162 |
| 164 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be | 163 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be |
| 165 // destroyed and used on the same thread it was created on. | 164 // destroyed and used on the same thread it was created on. |
| 166 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; | 165 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; |
| 167 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> | 166 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> |
| 168 pending_transaction_callbacks_; | 167 pending_transaction_callbacks_; |
| 169 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> | 168 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> |
| 170 pending_database_callbacks_; | 169 pending_database_callbacks_; |
| 171 | 170 |
| 172 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 171 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 173 }; | 172 }; |
| 174 | 173 |
| 175 #endif // CONTENT_RENDERER_INDEXED_DB_DISPATCHER_H_ | 174 #endif // CONTENT_RENDERER_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |