Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: content/common/indexed_db/indexed_db.mojom

Issue 2509913002: Implement StructTraits for remaining IndexedDB IPC types. (Closed)
Patch Set: Fix compile error on GCC. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/indexed_db/OWNERS ('k') | content/common/indexed_db/indexed_db.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 import "mojo/common/common_custom_types.mojom"; 11 import "mojo/common/common_custom_types.mojom";
12 import "url/mojo/origin.mojom"; 12 import "url/mojo/origin.mojom";
13 13
14 enum CursorDirection { 14 enum CursorDirection {
15 Next, 15 Next,
16 NextNoDuplicate, 16 NextNoDuplicate,
17 Prev, 17 Prev,
18 PrevNoDuplicate, 18 PrevNoDuplicate,
19 }; 19 };
20 20
21 enum DataLoss { 21 enum DataLoss {
22 None, 22 None,
23 Total, 23 Total,
24 }; 24 };
25 25
26 [Native] 26 // Represents key types that hold no data and so cannot be options in the
27 struct Key; 27 // KeyData union.
28 // TODO(jsbell): These types should be cleaned up end-to-end, leaving only the
29 // dataful options.
30 enum DatalessKeyType {
31 Invalid,
32 Null,
33 };
28 34
29 [Native] 35 union KeyData {
30 struct KeyPath; 36 array<Key> key_array;
37 array<uint8> binary;
38 mojo.common.mojom.String16 string;
39 double date;
40 double number;
41 DatalessKeyType other;
42 };
31 43
32 [Native] 44 // Defined as a structure so that it can by typemapped with StructTraits.
33 struct KeyRange; 45 struct Key {
46 KeyData data;
47 };
48
49 // Represents WebIDBKeyPathTypeString and WebIDBKeyPathTypeArray in a key path.
50 union KeyPathData {
51 mojo.common.mojom.String16 string;
52 array<mojo.common.mojom.String16> string_array;
53 };
54
55 struct KeyPath {
56 // A null value here corresponds to WebIDBKeyPathTypeNull.
57 KeyPathData? data;
58 };
59
60 struct KeyRange {
61 Key lower;
62 Key upper;
63 bool lower_open;
64 bool upper_open;
65 };
34 66
35 enum PutMode { 67 enum PutMode {
36 AddOrUpdate, 68 AddOrUpdate,
37 AddOnly, 69 AddOnly,
38 CursorUpdate, 70 CursorUpdate,
39 }; 71 };
40 72
41 enum TaskType { 73 enum TaskType {
42 Normal, 74 Normal,
43 Preemptive, 75 Preemptive,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 }; 296 };
265 297
266 interface Factory { 298 interface Factory {
267 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); 299 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
268 Open(int32 worker_thread, associated Callbacks callbacks, 300 Open(int32 worker_thread, associated Callbacks callbacks,
269 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, 301 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin,
270 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); 302 mojo.common.mojom.String16 name, int64 version, int64 transaction_id);
271 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, 303 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin,
272 mojo.common.mojom.String16 name); 304 mojo.common.mojom.String16 name);
273 }; 305 };
OLDNEW
« no previous file with comments | « content/common/indexed_db/OWNERS ('k') | content/common/indexed_db/indexed_db.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698