| 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 // Message definition file, included multiple times, hence no include guard. | 5 // Message definition file, included multiple times, hence no include guard. |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "content/common/indexed_db/indexed_db_key.h" | 9 #include "content/common/indexed_db/indexed_db_key.h" |
| 10 #include "content/common/indexed_db/indexed_db_key_path.h" | 10 #include "content/common/indexed_db/indexed_db_key_path.h" |
| 11 #include "content/common/indexed_db/indexed_db_key_range.h" | 11 #include "content/common/indexed_db/indexed_db_key_range.h" |
| 12 #include "content/common/indexed_db/indexed_db_param_traits.h" | 12 #include "content/common/indexed_db/indexed_db_param_traits.h" |
| 13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 14 #include "ipc/ipc_param_traits.h" | 14 #include "ipc/ipc_param_traits.h" |
| 15 #include "third_party/WebKit/public/platform/WebIDBCursor.h" | 15 #include "third_party/WebKit/public/platform/WebIDBCursor.h" |
| 16 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" | 16 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" |
| 17 | 17 |
| 18 #define IPC_MESSAGE_START IndexedDBMsgStart | 18 #define IPC_MESSAGE_START IndexedDBMsgStart |
| 19 | 19 |
| 20 // Argument structures used in messages | 20 // Argument structures used in messages |
| 21 | 21 |
| 22 IPC_ENUM_TRAITS(WebKit::WebIDBCursor::Direction) | 22 IPC_ENUM_TRAITS(blink::WebIDBCursor::Direction) |
| 23 IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::PutMode) | 23 IPC_ENUM_TRAITS(blink::WebIDBDatabase::PutMode) |
| 24 IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::TaskType) | 24 IPC_ENUM_TRAITS(blink::WebIDBDatabase::TaskType) |
| 25 | 25 |
| 26 IPC_ENUM_TRAITS_MAX_VALUE(WebKit::WebIDBCallbacks::DataLoss, | 26 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCallbacks::DataLoss, |
| 27 WebKit::WebIDBCallbacks::DataLossTotal) | 27 blink::WebIDBCallbacks::DataLossTotal) |
| 28 | 28 |
| 29 // Used to enumerate indexed databases. | 29 // Used to enumerate indexed databases. |
| 30 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) | 30 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) |
| 31 // The response should have these ids. | 31 // The response should have these ids. |
| 32 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 32 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
| 33 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 33 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
| 34 // The string id of the origin doing the initiating. | 34 // The string id of the origin doing the initiating. |
| 35 IPC_STRUCT_MEMBER(std::string, database_identifier) | 35 IPC_STRUCT_MEMBER(std::string, database_identifier) |
| 36 IPC_STRUCT_END() | 36 IPC_STRUCT_END() |
| 37 | 37 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 IPC_STRUCT_MEMBER(int64, transaction_id) | 123 IPC_STRUCT_MEMBER(int64, transaction_id) |
| 124 // The object store's id. | 124 // The object store's id. |
| 125 IPC_STRUCT_MEMBER(int64, object_store_id) | 125 IPC_STRUCT_MEMBER(int64, object_store_id) |
| 126 // The index's id. | 126 // The index's id. |
| 127 IPC_STRUCT_MEMBER(int64, index_id) | 127 IPC_STRUCT_MEMBER(int64, index_id) |
| 128 // The value to set. | 128 // The value to set. |
| 129 IPC_STRUCT_MEMBER(std::string, value) | 129 IPC_STRUCT_MEMBER(std::string, value) |
| 130 // The key to set it on (may not be "valid"/set in some cases). | 130 // The key to set it on (may not be "valid"/set in some cases). |
| 131 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 131 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
| 132 // Whether this is an add or a put. | 132 // Whether this is an add or a put. |
| 133 IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::PutMode, put_mode) | 133 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode) |
| 134 // The names of the indexes used below. | 134 // The names of the indexes used below. |
| 135 IPC_STRUCT_MEMBER(std::vector<int64>, index_ids) | 135 IPC_STRUCT_MEMBER(std::vector<int64>, index_ids) |
| 136 // The keys for each index, such that each inner vector corresponds | 136 // The keys for each index, such that each inner vector corresponds |
| 137 // to each index named in index_names, respectively. | 137 // to each index named in index_names, respectively. |
| 138 IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >, | 138 IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >, |
| 139 index_keys) | 139 index_keys) |
| 140 IPC_STRUCT_END() | 140 IPC_STRUCT_END() |
| 141 | 141 |
| 142 // Used to open both cursors and object cursors in IndexedDB. | 142 // Used to open both cursors and object cursors in IndexedDB. |
| 143 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) | 143 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) |
| 144 // The response should have these ids. | 144 // The response should have these ids. |
| 145 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 145 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
| 146 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 146 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
| 147 // The database the object store belongs to. | 147 // The database the object store belongs to. |
| 148 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 148 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
| 149 // The transaction this request belongs to. | 149 // The transaction this request belongs to. |
| 150 IPC_STRUCT_MEMBER(int64, transaction_id) | 150 IPC_STRUCT_MEMBER(int64, transaction_id) |
| 151 // The object store. | 151 // The object store. |
| 152 IPC_STRUCT_MEMBER(int64, object_store_id) | 152 IPC_STRUCT_MEMBER(int64, object_store_id) |
| 153 // The index if any. | 153 // The index if any. |
| 154 IPC_STRUCT_MEMBER(int64, index_id) | 154 IPC_STRUCT_MEMBER(int64, index_id) |
| 155 // The serialized key range. | 155 // The serialized key range. |
| 156 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 156 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
| 157 // The direction of this cursor. | 157 // The direction of this cursor. |
| 158 IPC_STRUCT_MEMBER(int32, direction) | 158 IPC_STRUCT_MEMBER(int32, direction) |
| 159 // If this is just retrieving the key | 159 // If this is just retrieving the key |
| 160 IPC_STRUCT_MEMBER(bool, key_only) | 160 IPC_STRUCT_MEMBER(bool, key_only) |
| 161 // The priority of this cursor. | 161 // The priority of this cursor. |
| 162 IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::TaskType, task_type) | 162 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TaskType, task_type) |
| 163 IPC_STRUCT_END() | 163 IPC_STRUCT_END() |
| 164 | 164 |
| 165 // Used to open both cursors and object cursors in IndexedDB. | 165 // Used to open both cursors and object cursors in IndexedDB. |
| 166 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params) | 166 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params) |
| 167 // The response should have these ids. | 167 // The response should have these ids. |
| 168 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 168 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
| 169 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 169 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
| 170 // The transaction this request belongs to. | 170 // The transaction this request belongs to. |
| 171 IPC_STRUCT_MEMBER(int64, transaction_id) | 171 IPC_STRUCT_MEMBER(int64, transaction_id) |
| 172 // The IPC id of the database. | 172 // The IPC id of the database. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 IPC_STRUCT_MEMBER(int64, max_object_store_id) | 281 IPC_STRUCT_MEMBER(int64, max_object_store_id) |
| 282 IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) | 282 IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) |
| 283 IPC_STRUCT_END() | 283 IPC_STRUCT_END() |
| 284 | 284 |
| 285 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params) | 285 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params) |
| 286 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 286 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
| 287 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 287 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
| 288 IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id) | 288 IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id) |
| 289 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 289 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
| 290 IPC_STRUCT_MEMBER(int64, old_version) | 290 IPC_STRUCT_MEMBER(int64, old_version) |
| 291 IPC_STRUCT_MEMBER(WebKit::WebIDBCallbacks::DataLoss, data_loss) | 291 IPC_STRUCT_MEMBER(blink::WebIDBCallbacks::DataLoss, data_loss) |
| 292 IPC_STRUCT_MEMBER(std::string, data_loss_message) | 292 IPC_STRUCT_MEMBER(std::string, data_loss_message) |
| 293 IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata) | 293 IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata) |
| 294 IPC_STRUCT_END() | 294 IPC_STRUCT_END() |
| 295 | 295 |
| 296 // Indexed DB messages sent from the browser to the renderer. | 296 // Indexed DB messages sent from the browser to the renderer. |
| 297 | 297 |
| 298 // The thread_id needs to be the first parameter in these messages. In the IO | 298 // The thread_id needs to be the first parameter in these messages. In the IO |
| 299 // thread on the renderer/client process, an IDB message filter assumes the | 299 // thread on the renderer/client process, an IDB message filter assumes the |
| 300 // thread_id is the first int. | 300 // thread_id is the first int. |
| 301 | 301 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 // WebIDBDatabase::commit() message. | 499 // WebIDBDatabase::commit() message. |
| 500 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, | 500 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, |
| 501 int32, /* ipc_database_id */ | 501 int32, /* ipc_database_id */ |
| 502 int64) /* transaction_id */ | 502 int64) /* transaction_id */ |
| 503 | 503 |
| 504 // WebIDBDatabase::~WebIDBCursor() message. | 504 // WebIDBDatabase::~WebIDBCursor() message. |
| 505 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | 505 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, |
| 506 int32 /* ipc_cursor_id */) | 506 int32 /* ipc_cursor_id */) |
| 507 | 507 |
| OLD | NEW |