| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 blink::WebIDBCursorDirectionLast) | 43 blink::WebIDBCursorDirectionLast) |
| 44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBPutMode, blink::WebIDBPutModeLast) | 44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBPutMode, blink::WebIDBPutModeLast) |
| 45 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTaskType, blink::WebIDBTaskTypeLast) | 45 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTaskType, blink::WebIDBTaskTypeLast) |
| 46 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTransactionMode, | 46 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTransactionMode, |
| 47 blink::WebIDBTransactionModeLast) | 47 blink::WebIDBTransactionModeLast) |
| 48 | 48 |
| 49 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) | 49 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) |
| 50 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBOperationType, | 50 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBOperationType, |
| 51 blink::WebIDBOperationTypeLast) | 51 blink::WebIDBOperationTypeLast) |
| 52 | 52 |
| 53 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo) | |
| 54 IPC_STRUCT_MEMBER(bool, is_file) | |
| 55 IPC_STRUCT_MEMBER(std::string, uuid) | |
| 56 IPC_STRUCT_MEMBER(base::string16, mime_type) | |
| 57 IPC_STRUCT_MEMBER(uint64_t, size) | |
| 58 IPC_STRUCT_MEMBER(base::string16, file_path) | |
| 59 IPC_STRUCT_MEMBER(base::string16, file_name) | |
| 60 IPC_STRUCT_MEMBER(double, last_modified) | |
| 61 IPC_STRUCT_END() | |
| 62 | |
| 63 IPC_STRUCT_BEGIN(IndexedDBMsg_Value) | |
| 64 // The serialized value being transferred. | |
| 65 IPC_STRUCT_MEMBER(std::string, bits) | |
| 66 // Sideband data for any blob or file encoded in value. | |
| 67 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
| 68 IPC_STRUCT_END() | |
| 69 | |
| 70 IPC_STRUCT_BEGIN_WITH_PARENT(IndexedDBMsg_ReturnValue, IndexedDBMsg_Value) | |
| 71 IPC_STRUCT_TRAITS_PARENT(IndexedDBMsg_Value) | |
| 72 // Optional primary key & path used only when key generator specified. | |
| 73 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 74 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
| 75 IPC_STRUCT_END() | |
| 76 | |
| 77 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 78 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 79 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 80 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) | |
| 81 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | |
| 82 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
| 83 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value) | |
| 84 IPC_STRUCT_END() | |
| 85 | |
| 86 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) | |
| 87 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 88 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 89 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) | |
| 90 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys) | |
| 91 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys) | |
| 92 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Value>, values) | |
| 93 IPC_STRUCT_END() | |
| 94 | |
| 95 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params) | |
| 96 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) | |
| 97 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) | |
| 98 IPC_STRUCT_MEMBER(IndexedDBMsg_ReturnValue, value) | |
| 99 IPC_STRUCT_END() | |
| 100 | |
| 101 IPC_STRUCT_BEGIN(IndexedDBMsg_Observation) | 53 IPC_STRUCT_BEGIN(IndexedDBMsg_Observation) |
| 102 IPC_STRUCT_MEMBER(int64_t, object_store_id) | 54 IPC_STRUCT_MEMBER(int64_t, object_store_id) |
| 103 IPC_STRUCT_MEMBER(blink::WebIDBOperationType, type) | 55 IPC_STRUCT_MEMBER(blink::WebIDBOperationType, type) |
| 104 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 56 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
| 105 IPC_STRUCT_END() | 57 IPC_STRUCT_END() |
| 106 | 58 |
| 107 IPC_STRUCT_BEGIN(IndexedDBMsg_ObserverChanges) | 59 IPC_STRUCT_BEGIN(IndexedDBMsg_ObserverChanges) |
| 108 IPC_STRUCT_MEMBER(ObservationIndex, observation_index) | 60 IPC_STRUCT_MEMBER(ObservationIndex, observation_index) |
| 109 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Observation>, observations) | 61 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Observation>, observations) |
| 110 IPC_STRUCT_END() | 62 IPC_STRUCT_END() |
| 111 | 63 |
| 112 // Indexed DB messages sent from the browser to the renderer. | 64 // Indexed DB messages sent from the browser to the renderer. |
| 113 | 65 |
| 114 // The thread_id needs to be the first parameter in these messages. In the IO | 66 // The thread_id needs to be the first parameter in these messages. In the IO |
| 115 // thread on the renderer/client process, an IDB message filter assumes the | 67 // thread on the renderer/client process, an IDB message filter assumes the |
| 116 // thread_id is the first int. | 68 // thread_id is the first int. |
| 117 | 69 |
| 118 // IDBCallback message handlers. | |
| 119 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue, | |
| 120 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 121 | |
| 122 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance, | |
| 123 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | |
| 124 | |
| 125 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch, | |
| 126 IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) | |
| 127 | |
| 128 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue, | |
| 129 IndexedDBMsg_CallbacksSuccessValue_Params) | |
| 130 | |
| 131 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger, | |
| 132 int32_t /* ipc_thread_id */, | |
| 133 int32_t /* ipc_callbacks_id */, | |
| 134 int64_t /* value */) | |
| 135 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError, | |
| 136 int32_t /* ipc_thread_id */, | |
| 137 int32_t /* ipc_callbacks_id */, | |
| 138 int /* code */, | |
| 139 base::string16 /* message */) | |
| 140 | |
| 141 // IDBDatabaseCallback message handlers | 70 // IDBDatabaseCallback message handlers |
| 142 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksChanges, | 71 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksChanges, |
| 143 int32_t, /* ipc_thread_id */ | 72 int32_t, /* ipc_thread_id */ |
| 144 IndexedDBMsg_ObserverChanges) | 73 IndexedDBMsg_ObserverChanges) |
| 145 | |
| 146 // Indexed DB messages sent from the renderer to the browser. | |
| 147 | |
| 148 // WebIDBCursor::advance() message. | |
| 149 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance, | |
| 150 int32_t, /* ipc_cursor_id */ | |
| 151 int32_t, /* ipc_thread_id */ | |
| 152 int32_t, /* ipc_callbacks_id */ | |
| 153 uint32_t) /* count */ | |
| 154 | |
| 155 // WebIDBCursor::continue() message. | |
| 156 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_CursorContinue, | |
| 157 int32_t, /* ipc_cursor_id */ | |
| 158 int32_t, /* ipc_thread_id */ | |
| 159 int32_t, /* ipc_callbacks_id */ | |
| 160 content::IndexedDBKey, /* key */ | |
| 161 content::IndexedDBKey) /* primary_key */ | |
| 162 | |
| 163 // WebIDBCursor::prefetchContinue() message. | |
| 164 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch, | |
| 165 int32_t, /* ipc_cursor_id */ | |
| 166 int32_t, /* ipc_thread_id */ | |
| 167 int32_t, /* ipc_callbacks_id */ | |
| 168 int32_t) /* n */ | |
| 169 | |
| 170 // WebIDBCursor::prefetchReset() message. | |
| 171 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset, | |
| 172 int32_t, /* ipc_cursor_id */ | |
| 173 int32_t, /* used_prefetches */ | |
| 174 int32_t) /* used_prefetches */ | |
| 175 | |
| 176 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_AckReceivedBlobs, | |
| 177 std::vector<std::string>) /* uuids */ | |
| 178 | |
| 179 // WebIDBDatabase::~WebIDBCursor() message. | |
| 180 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | |
| 181 int32_t /* ipc_cursor_id */) | |
| OLD | NEW |