OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // TODO: This will move to //third_party/WebKit when //content/child/indexed_db | 5 // TODO: This will move to //third_party/WebKit when //content/child/indexed_db |
6 // is deleted but for now this will depend on //content/common types and so | 6 // is deleted but for now this will depend on //content/common types and so |
7 // so belongs here. | 7 // so belongs here. |
8 | 8 |
9 module indexed_db.mojom; | 9 module indexed_db.mojom; |
10 | 10 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 int64 id; | 155 int64 id; |
156 array<int64> scope; | 156 array<int64> scope; |
157 }; | 157 }; |
158 | 158 |
159 struct ObserverChanges { | 159 struct ObserverChanges { |
160 map<int32, array<int32>> observation_index_map; | 160 map<int32, array<int32>> observation_index_map; |
161 map<int32, ObserverTransaction> transaction_map; | 161 map<int32, ObserverTransaction> transaction_map; |
162 array<Observation> observations; | 162 array<Observation> observations; |
163 }; | 163 }; |
164 | 164 |
165 // Contains version data for the wire format used for encoding IndexedDB values. | |
166 // A version tuple (a, b) is at least as new as (a', b') | |
167 // iff a >= a' and b >= b'. | |
168 struct DataFormatVersion { | |
169 uint32 v8_version; | |
170 uint32 blink_version; | |
171 }; | |
172 | |
165 // The Callbacks interface is used to return results for individual requests. | 173 // The Callbacks interface is used to return results for individual requests. |
166 // Some requests may return multiple results before completion, such as | 174 // Some requests may return multiple results before completion, such as |
167 // UpgradeNeeded before SuccessDatabase. | 175 // UpgradeNeeded before SuccessDatabase. |
168 // | 176 // |
169 // TODO(https://crbug.com/627484): Many of these could be replaced with | 177 // TODO(https://crbug.com/627484): Many of these could be replaced with |
170 // replies associated with particular messages. | 178 // replies associated with particular messages. |
171 interface Callbacks { | 179 interface Callbacks { |
172 Error(int32 code, mojo.common.mojom.String16 message); | 180 Error(int32 code, mojo.common.mojom.String16 message); |
173 | 181 |
174 // Factory::GetDatabaseNames | 182 // Factory::GetDatabaseNames |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 RenameIndex(int64 transaction_id, | 325 RenameIndex(int64 transaction_id, |
318 int64 object_store_id, | 326 int64 object_store_id, |
319 int64 index_id, | 327 int64 index_id, |
320 mojo.common.mojom.String16 new_name); | 328 mojo.common.mojom.String16 new_name); |
321 Abort(int64 transaction_id); | 329 Abort(int64 transaction_id); |
322 Commit(int64 transaction_id); | 330 Commit(int64 transaction_id); |
323 AckReceivedBlobs(array<string> uuids); | 331 AckReceivedBlobs(array<string> uuids); |
324 }; | 332 }; |
325 | 333 |
326 interface Factory { | 334 interface Factory { |
335 // The backing store for a given origin should only be opened by clients | |
336 // configured with the same supported data version. It is assumed that this | |
337 // version is fixed at runtime. | |
dcheng
2017/04/04 19:59:21
It kind of feels like this could even bound at com
| |
338 Configure(DataFormatVersion supported_data_format_version); | |
339 | |
327 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); | 340 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); |
328 Open(associated Callbacks callbacks, | 341 Open(associated Callbacks callbacks, |
329 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, | 342 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, |
330 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); | 343 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); |
331 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, | 344 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, |
332 mojo.common.mojom.String16 name, bool force_close); | 345 mojo.common.mojom.String16 name, bool force_close); |
333 }; | 346 }; |
OLD | NEW |