| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Message definition file, included multiple times, hence no include guard. | |
| 6 | |
| 7 #include <stdint.h> | |
| 8 | |
| 9 #include <string> | |
| 10 #include <utility> | |
| 11 #include <vector> | |
| 12 | |
| 13 #include "content/common/indexed_db/indexed_db_key.h" | |
| 14 #include "content/common/indexed_db/indexed_db_key_path.h" | |
| 15 #include "content/common/indexed_db/indexed_db_key_range.h" | |
| 16 #include "content/common/indexed_db/indexed_db_param_traits.h" | |
| 17 #include "ipc/ipc_message_macros.h" | |
| 18 #include "ipc/ipc_param_traits.h" | |
| 19 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" | |
| 20 #include "url/origin.h" | |
| 21 | |
| 22 // Singly-included section for typedefs in multiply-included file. | |
| 23 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ | |
| 24 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ | |
| 25 | |
| 26 // An index id, and corresponding set of keys to insert. | |
| 27 typedef std::pair<int64_t, std::vector<content::IndexedDBKey>> IndexKeys; | |
| 28 | |
| 29 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ | |
| 30 | |
| 31 #undef IPC_MESSAGE_EXPORT | |
| 32 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | |
| 33 #define IPC_MESSAGE_START IndexedDBMsgStart | |
| 34 | |
| 35 // Argument structures used in messages | |
| 36 | |
| 37 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursorDirection, | |
| 38 blink::WebIDBCursorDirectionLast) | |
| 39 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBPutMode, blink::WebIDBPutModeLast) | |
| 40 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTaskType, blink::WebIDBTaskTypeLast) | |
| 41 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTransactionMode, | |
| 42 blink::WebIDBTransactionModeLast) | |
| 43 | |
| 44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) | |
| 45 | |
| 46 // Used to enumerate indexed databases. | |
| 47 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) | |
| 48 // The response should have these ids. | |
| 49 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 50 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 51 // The origin doing the initiating. | |
| 52 IPC_STRUCT_MEMBER(url::Origin, origin) | |
| 53 IPC_STRUCT_END() | |
| 54 | |
| 55 // Used to open an indexed database. | |
| 56 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params) | |
| 57 // The response should have these ids. | |
| 58 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 59 // Identifier of the request | |
| 60 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 61 // Identifier for database callbacks | |
| 62 IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id) | |
| 63 // The origin doing the initiating. | |
| 64 IPC_STRUCT_MEMBER(url::Origin, origin) | |
| 65 // The name of the database. | |
| 66 IPC_STRUCT_MEMBER(base::string16, name) | |
| 67 // The transaction id used if a database upgrade is needed. | |
| 68 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 69 // The requested version of the database. | |
| 70 IPC_STRUCT_MEMBER(int64_t, version) | |
| 71 IPC_STRUCT_END() | |
| 72 | |
| 73 // Used to delete an indexed database. | |
| 74 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params) | |
| 75 // The response should have these ids. | |
| 76 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 77 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 78 // The origin doing the initiating. | |
| 79 IPC_STRUCT_MEMBER(url::Origin, origin) | |
| 80 // The name of the database. | |
| 81 IPC_STRUCT_MEMBER(base::string16, name) | |
| 82 IPC_STRUCT_END() | |
| 83 | |
| 84 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params) | |
| 85 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 86 // The database the object store belongs to. | |
| 87 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 88 // The transaction id as minted by the frontend. | |
| 89 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 90 // To get to WebIDBDatabaseCallbacks. | |
| 91 IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id) | |
| 92 // The scope of the transaction. | |
| 93 IPC_STRUCT_MEMBER(std::vector<int64_t>, object_store_ids) | |
| 94 // The transaction mode. | |
| 95 IPC_STRUCT_MEMBER(blink::WebIDBTransactionMode, mode) | |
| 96 IPC_STRUCT_END() | |
| 97 | |
| 98 // Used to create an object store. | |
| 99 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | |
| 100 // The database the object store belongs to. | |
| 101 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 102 // The transaction its associated with. | |
| 103 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 104 // The storage id of the object store. | |
| 105 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 106 // The name of the object store. | |
| 107 IPC_STRUCT_MEMBER(base::string16, name) | |
| 108 // The keyPath of the object store. | |
| 109 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 110 // Whether the object store created should have a key generator. | |
| 111 IPC_STRUCT_MEMBER(bool, auto_increment) | |
| 112 IPC_STRUCT_END() | |
| 113 | |
| 114 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params) | |
| 115 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 116 // The id any response should contain. | |
| 117 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 118 // The database the object store belongs to. | |
| 119 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 120 // The transaction its associated with. | |
| 121 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 122 // The object store's id. | |
| 123 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 124 // The index's id. | |
| 125 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 126 // The serialized key range. | |
| 127 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | |
| 128 // If this is just retrieving the key | |
| 129 IPC_STRUCT_MEMBER(bool, key_only) | |
| 130 IPC_STRUCT_END() | |
| 131 | |
| 132 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGetAll_Params) | |
| 133 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 134 // The id any response should contain. | |
| 135 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 136 // The database the object store belongs to. | |
| 137 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 138 // The transaction its associated with. | |
| 139 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 140 // The object store's id. | |
| 141 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 142 // The index id. | |
| 143 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 144 // The serialized key range. | |
| 145 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | |
| 146 // If this is just retrieving the key | |
| 147 IPC_STRUCT_MEMBER(bool, key_only) | |
| 148 // The max number of values to retrieve. | |
| 149 IPC_STRUCT_MEMBER(int64_t, max_count) | |
| 150 IPC_STRUCT_END() | |
| 151 | |
| 152 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo) | |
| 153 IPC_STRUCT_MEMBER(bool, is_file) | |
| 154 IPC_STRUCT_MEMBER(std::string, uuid) | |
| 155 IPC_STRUCT_MEMBER(base::string16, mime_type) | |
| 156 IPC_STRUCT_MEMBER(uint64_t, size) | |
| 157 IPC_STRUCT_MEMBER(base::string16, file_path) | |
| 158 IPC_STRUCT_MEMBER(base::string16, file_name) | |
| 159 IPC_STRUCT_MEMBER(double, last_modified) | |
| 160 IPC_STRUCT_END() | |
| 161 | |
| 162 IPC_STRUCT_BEGIN(IndexedDBMsg_Value) | |
| 163 // The serialized value being transferred. | |
| 164 IPC_STRUCT_MEMBER(std::string, bits) | |
| 165 // Sideband data for any blob or file encoded in value. | |
| 166 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
| 167 IPC_STRUCT_END() | |
| 168 | |
| 169 IPC_STRUCT_BEGIN_WITH_PARENT(IndexedDBMsg_ReturnValue, IndexedDBMsg_Value) | |
| 170 IPC_STRUCT_TRAITS_PARENT(IndexedDBMsg_Value) | |
| 171 // Optional primary key & path used only when key generator specified. | |
| 172 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 173 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 174 IPC_STRUCT_END() | |
| 175 | |
| 176 // Used to set a value in an object store. | |
| 177 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params) | |
| 178 // The id any response should contain. | |
| 179 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 180 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 181 // The database the object store belongs to. | |
| 182 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 183 // The transaction it's associated with. | |
| 184 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 185 // The object store's id. | |
| 186 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 187 // The index's id. | |
| 188 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 189 // The value to set. | |
| 190 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value) | |
| 191 // The key to set it on (may not be "valid"/set in some cases). | |
| 192 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | |
| 193 // Whether this is an add or a put. | |
| 194 IPC_STRUCT_MEMBER(blink::WebIDBPutMode, put_mode) | |
| 195 // The index ids and the list of keys for each index. | |
| 196 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) | |
| 197 IPC_STRUCT_END() | |
| 198 | |
| 199 // Used to open both cursors and object cursors in IndexedDB. | |
| 200 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) | |
| 201 // The response should have these ids. | |
| 202 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 203 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 204 // The database the object store belongs to. | |
| 205 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 206 // The transaction this request belongs to. | |
| 207 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 208 // The object store. | |
| 209 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 210 // The index if any. | |
| 211 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 212 // The serialized key range. | |
| 213 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | |
| 214 // The direction of this cursor. | |
| 215 IPC_STRUCT_MEMBER(blink::WebIDBCursorDirection, direction) | |
| 216 // If this is just retrieving the key | |
| 217 IPC_STRUCT_MEMBER(bool, key_only) | |
| 218 // The priority of this cursor. | |
| 219 IPC_STRUCT_MEMBER(blink::WebIDBTaskType, task_type) | |
| 220 IPC_STRUCT_END() | |
| 221 | |
| 222 // Used to open both cursors and object cursors in IndexedDB. | |
| 223 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params) | |
| 224 // The response should have these ids. | |
| 225 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 226 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 227 // The transaction this request belongs to. | |
| 228 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 229 // The IPC id of the database. | |
| 230 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 231 // The object store. | |
| 232 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 233 // The index if any. | |
| 234 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 235 // The serialized key range. | |
| 236 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | |
| 237 IPC_STRUCT_END() | |
| 238 | |
| 239 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseDeleteRange_Params) | |
| 240 // The response should have these ids. | |
| 241 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 242 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 243 // The IPC id of the database. | |
| 244 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 245 // The transaction this request belongs to. | |
| 246 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 247 // The object store. | |
| 248 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 249 // The serialized key range. | |
| 250 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | |
| 251 IPC_STRUCT_END() | |
| 252 | |
| 253 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseSetIndexKeys_Params) | |
| 254 // The IPC id of the database. | |
| 255 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 256 // The transaction this request belongs to. | |
| 257 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 258 // The object store's id. | |
| 259 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 260 // The object store key that we're setting index keys for. | |
| 261 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 262 // The index ids and the list of keys for each index. | |
| 263 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) | |
| 264 IPC_STRUCT_END() | |
| 265 | |
| 266 // Used to create an index. | |
| 267 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params) | |
| 268 // The transaction this is associated with. | |
| 269 IPC_STRUCT_MEMBER(int64_t, transaction_id) | |
| 270 // The database being used. | |
| 271 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 272 // The object store the index belongs to. | |
| 273 IPC_STRUCT_MEMBER(int64_t, object_store_id) | |
| 274 // The storage id of the index. | |
| 275 IPC_STRUCT_MEMBER(int64_t, index_id) | |
| 276 // The name of the index. | |
| 277 IPC_STRUCT_MEMBER(base::string16, name) | |
| 278 // The keyPath of the index. | |
| 279 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 280 // Whether the index created has unique keys. | |
| 281 IPC_STRUCT_MEMBER(bool, unique) | |
| 282 // Whether the index created produces keys for each array entry. | |
| 283 IPC_STRUCT_MEMBER(bool, multi_entry) | |
| 284 IPC_STRUCT_END() | |
| 285 | |
| 286 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params) | |
| 287 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 288 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 289 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) | |
| 290 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | |
| 291 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 292 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value) | |
| 293 IPC_STRUCT_END() | |
| 294 | |
| 295 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 296 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 297 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 298 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) | |
| 299 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | |
| 300 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 301 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value) | |
| 302 IPC_STRUCT_END() | |
| 303 | |
| 304 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) | |
| 305 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 306 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 307 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) | |
| 308 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys) | |
| 309 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys) | |
| 310 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Value>, values) | |
| 311 IPC_STRUCT_END() | |
| 312 | |
| 313 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessArray_Params) | |
| 314 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 315 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 316 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_ReturnValue>, values) | |
| 317 IPC_STRUCT_END() | |
| 318 | |
| 319 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params) | |
| 320 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 321 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 322 IPC_STRUCT_MEMBER(IndexedDBMsg_ReturnValue, value) | |
| 323 IPC_STRUCT_END() | |
| 324 | |
| 325 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata) | |
| 326 IPC_STRUCT_MEMBER(int64_t, id) | |
| 327 IPC_STRUCT_MEMBER(base::string16, name) | |
| 328 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 329 IPC_STRUCT_MEMBER(bool, unique) | |
| 330 IPC_STRUCT_MEMBER(bool, multi_entry) | |
| 331 IPC_STRUCT_END() | |
| 332 | |
| 333 IPC_STRUCT_BEGIN(IndexedDBObjectStoreMetadata) | |
| 334 IPC_STRUCT_MEMBER(int64_t, id) | |
| 335 IPC_STRUCT_MEMBER(base::string16, name) | |
| 336 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 337 IPC_STRUCT_MEMBER(bool, auto_increment) | |
| 338 IPC_STRUCT_MEMBER(int64_t, max_index_id) | |
| 339 IPC_STRUCT_MEMBER(std::vector<IndexedDBIndexMetadata>, indexes) | |
| 340 IPC_STRUCT_END() | |
| 341 | |
| 342 IPC_STRUCT_BEGIN(IndexedDBDatabaseMetadata) | |
| 343 IPC_STRUCT_MEMBER(int64_t, id) | |
| 344 IPC_STRUCT_MEMBER(base::string16, name) | |
| 345 IPC_STRUCT_MEMBER(int64_t, version) | |
| 346 IPC_STRUCT_MEMBER(int64_t, max_object_store_id) | |
| 347 IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) | |
| 348 IPC_STRUCT_END() | |
| 349 | |
| 350 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params) | |
| 351 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 352 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 353 IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id) | |
| 354 IPC_STRUCT_MEMBER(int32_t, ipc_database_id) | |
| 355 IPC_STRUCT_MEMBER(int64_t, old_version) | |
| 356 IPC_STRUCT_MEMBER(blink::WebIDBDataLoss, data_loss) | |
| 357 IPC_STRUCT_MEMBER(std::string, data_loss_message) | |
| 358 IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata) | |
| 359 IPC_STRUCT_END() | |
| 360 | |
| 361 // Indexed DB messages sent from the browser to the renderer. | |
| 362 | |
| 363 // The thread_id needs to be the first parameter in these messages. In the IO | |
| 364 // thread on the renderer/client process, an IDB message filter assumes the | |
| 365 // thread_id is the first int. | |
| 366 | |
| 367 // IDBCallback message handlers. | |
| 368 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor, | |
| 369 IndexedDBMsg_CallbacksSuccessIDBCursor_Params) | |
| 370 | |
| 371 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue, | |
| 372 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 373 | |
| 374 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance, | |
| 375 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 376 | |
| 377 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch, | |
| 378 IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) | |
| 379 | |
| 380 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessArray, | |
| 381 IndexedDBMsg_CallbacksSuccessArray_Params) | |
| 382 | |
| 383 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase, | |
| 384 int32_t /* ipc_thread_id */, | |
| 385 int32_t /* ipc_callbacks_id */, | |
| 386 int32_t /* ipc_database_callbacks_id */, | |
| 387 int32_t /* ipc_database_id */, | |
| 388 IndexedDBDatabaseMetadata) | |
| 389 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey, | |
| 390 int32_t /* ipc_thread_id */, | |
| 391 int32_t /* ipc_callbacks_id */, | |
| 392 content::IndexedDBKey /* indexed_db_key */) | |
| 393 | |
| 394 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue, | |
| 395 IndexedDBMsg_CallbacksSuccessValue_Params) | |
| 396 | |
| 397 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger, | |
| 398 int32_t /* ipc_thread_id */, | |
| 399 int32_t /* ipc_callbacks_id */, | |
| 400 int64_t /* value */) | |
| 401 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined, | |
| 402 int32_t /* ipc_thread_id */, | |
| 403 int32_t /* ipc_callbacks_id */) | |
| 404 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList, | |
| 405 int32_t /* ipc_thread_id */, | |
| 406 int32_t /* ipc_callbacks_id */, | |
| 407 std::vector<base::string16> /* dom_string_list */) | |
| 408 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError, | |
| 409 int32_t /* ipc_thread_id */, | |
| 410 int32_t /* ipc_callbacks_id */, | |
| 411 int /* code */, | |
| 412 base::string16 /* message */) | |
| 413 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked, | |
| 414 int32_t /* ipc_thread_id */, | |
| 415 int32_t /* ipc_callbacks_id */) | |
| 416 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked, | |
| 417 int32_t /* ipc_thread_id */, | |
| 418 int32_t /* ipc_callbacks_id */, | |
| 419 int64_t /* existing_version */) | |
| 420 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksUpgradeNeeded, | |
| 421 IndexedDBMsg_CallbacksUpgradeNeeded_Params) | |
| 422 | |
| 423 // IDBDatabaseCallback message handlers | |
| 424 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksForcedClose, | |
| 425 int32_t, /* ipc_thread_id */ | |
| 426 int32_t) /* ipc_database_callbacks_id */ | |
| 427 IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksVersionChange, | |
| 428 int32_t, /* ipc_thread_id */ | |
| 429 int32_t, /* ipc_database_callbacks_id */ | |
| 430 int64_t, /* old_version */ | |
| 431 int64_t) /* new_version */ | |
| 432 IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort, | |
| 433 int32_t, /* ipc_thread_id */ | |
| 434 int32_t, /* ipc_database_callbacks_id */ | |
| 435 int64_t, /* transaction_id */ | |
| 436 int, /* code */ | |
| 437 base::string16) /* message */ | |
| 438 IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete, | |
| 439 int32_t, /* ipc_thread_id */ | |
| 440 int32_t, /* ipc_database_callbacks_id */ | |
| 441 int64_t) /* transaction_id */ | |
| 442 | |
| 443 // Indexed DB messages sent from the renderer to the browser. | |
| 444 | |
| 445 // WebIDBCursor::advance() message. | |
| 446 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance, | |
| 447 int32_t, /* ipc_cursor_id */ | |
| 448 int32_t, /* ipc_thread_id */ | |
| 449 int32_t, /* ipc_callbacks_id */ | |
| 450 uint32_t) /* count */ | |
| 451 | |
| 452 // WebIDBCursor::continue() message. | |
| 453 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_CursorContinue, | |
| 454 int32_t, /* ipc_cursor_id */ | |
| 455 int32_t, /* ipc_thread_id */ | |
| 456 int32_t, /* ipc_callbacks_id */ | |
| 457 content::IndexedDBKey, /* key */ | |
| 458 content::IndexedDBKey) /* primary_key */ | |
| 459 | |
| 460 // WebIDBCursor::prefetchContinue() message. | |
| 461 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch, | |
| 462 int32_t, /* ipc_cursor_id */ | |
| 463 int32_t, /* ipc_thread_id */ | |
| 464 int32_t, /* ipc_callbacks_id */ | |
| 465 int32_t) /* n */ | |
| 466 | |
| 467 // WebIDBCursor::prefetchReset() message. | |
| 468 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset, | |
| 469 int32_t, /* ipc_cursor_id */ | |
| 470 int32_t, /* used_prefetches */ | |
| 471 int32_t) /* used_prefetches */ | |
| 472 | |
| 473 // WebIDBFactory::getDatabaseNames() message. | |
| 474 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryGetDatabaseNames, | |
| 475 IndexedDBHostMsg_FactoryGetDatabaseNames_Params) | |
| 476 | |
| 477 // WebIDBFactory::open() message. | |
| 478 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen, | |
| 479 IndexedDBHostMsg_FactoryOpen_Params) | |
| 480 | |
| 481 // WebIDBFactory::deleteDatabase() message. | |
| 482 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase, | |
| 483 IndexedDBHostMsg_FactoryDeleteDatabase_Params) | |
| 484 | |
| 485 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_AckReceivedBlobs, | |
| 486 std::vector<std::string>) /* uuids */ | |
| 487 | |
| 488 // WebIDBDatabase::observe() message. | |
| 489 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseObserve, | |
| 490 int32_t, /* ipc_database_id */ | |
| 491 int64_t, /* transaction_id */ | |
| 492 int32_t) /* observer_id */ | |
| 493 | |
| 494 // WebIDBDatabase::unobserve() message. | |
| 495 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseUnobserve, | |
| 496 int32_t, /* ipc_database_id */ | |
| 497 std::vector<int32_t>) /* list of observer_id */ | |
| 498 | |
| 499 // WebIDBDatabase::createObjectStore() message. | |
| 500 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore, | |
| 501 IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | |
| 502 | |
| 503 // WebIDBDatabase::deleteObjectStore() message. | |
| 504 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore, | |
| 505 int32_t, /* ipc_database_id */ | |
| 506 int64_t, /* transaction_id */ | |
| 507 int64_t) /* object_store_id */ | |
| 508 | |
| 509 // WebIDBDatabase::createTransaction() message. | |
| 510 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction, | |
| 511 IndexedDBHostMsg_DatabaseCreateTransaction_Params) | |
| 512 | |
| 513 // WebIDBDatabase::close() message. | |
| 514 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose, | |
| 515 int32_t /* ipc_database_id */) | |
| 516 | |
| 517 // WebIDBDatabase::versionChangeIgnored() message. | |
| 518 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseVersionChangeIgnored, | |
| 519 int32_t /* ipc_database_id */) | |
| 520 | |
| 521 // WebIDBDatabase::~WebIDBDatabase() message. | |
| 522 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed, | |
| 523 int32_t /* ipc_database_id */) | |
| 524 | |
| 525 // WebIDBDatabase::get() message. | |
| 526 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet, | |
| 527 IndexedDBHostMsg_DatabaseGet_Params) | |
| 528 | |
| 529 // WebIDBDatabase::getAll() message. | |
| 530 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGetAll, | |
| 531 IndexedDBHostMsg_DatabaseGetAll_Params) | |
| 532 | |
| 533 // WebIDBDatabase::put() message. | |
| 534 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut, | |
| 535 IndexedDBHostMsg_DatabasePut_Params) | |
| 536 | |
| 537 // WebIDBDatabase::setIndexKeys() message. | |
| 538 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseSetIndexKeys, | |
| 539 IndexedDBHostMsg_DatabaseSetIndexKeys_Params) | |
| 540 | |
| 541 // WebIDBDatabase::setIndexesReady() message. | |
| 542 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady, | |
| 543 int32_t, /* ipc_database_id */ | |
| 544 int64_t, /* transaction_id */ | |
| 545 int64_t, /* object_store_id */ | |
| 546 std::vector<int64_t>) /* index_ids */ | |
| 547 | |
| 548 // WebIDBDatabase::openCursor() message. | |
| 549 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor, | |
| 550 IndexedDBHostMsg_DatabaseOpenCursor_Params) | |
| 551 | |
| 552 // WebIDBDatabase::count() message. | |
| 553 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCount, | |
| 554 IndexedDBHostMsg_DatabaseCount_Params) | |
| 555 | |
| 556 // WebIDBDatabase::deleteRange() message. | |
| 557 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDeleteRange, | |
| 558 IndexedDBHostMsg_DatabaseDeleteRange_Params) | |
| 559 | |
| 560 // WebIDBDatabase::clear() message. | |
| 561 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear, | |
| 562 int32_t, /* ipc_thread_id */ | |
| 563 int32_t, /* ipc_callbacks_id */ | |
| 564 int32_t, /* ipc_database_id */ | |
| 565 int64_t, /* transaction_id */ | |
| 566 int64_t) /* object_store_id */ | |
| 567 | |
| 568 // WebIDBDatabase::createIndex() message. | |
| 569 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex, | |
| 570 IndexedDBHostMsg_DatabaseCreateIndex_Params) | |
| 571 | |
| 572 // WebIDBDatabase::deleteIndex() message. | |
| 573 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex, | |
| 574 int32_t, /* ipc_database_id */ | |
| 575 int64_t, /* transaction_id */ | |
| 576 int64_t, /* object_store_id */ | |
| 577 int64_t) /* index_id */ | |
| 578 | |
| 579 // WebIDBDatabase::abort() message. | |
| 580 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort, | |
| 581 int32_t, /* ipc_database_id */ | |
| 582 int64_t) /* transaction_id */ | |
| 583 | |
| 584 // WebIDBDatabase::commit() message. | |
| 585 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, | |
| 586 int32_t, /* ipc_database_id */ | |
| 587 int64_t) /* transaction_id */ | |
| 588 | |
| 589 // WebIDBDatabase::~WebIDBCursor() message. | |
| 590 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | |
| 591 int32_t /* ipc_cursor_id */) | |
| OLD | NEW |