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

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

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Addressed most of dcheng@'s feedback. Created 4 years, 2 months 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
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
7 // so belongs here.
8
9 module indexed_db.mojom;
10
11 import "mojo/common/common_custom_types.mojom";
12 import "url/mojo/origin.mojom";
13
14 [Native]
15 enum DataLoss;
16
17 [Native]
18 struct KeyPath;
19
20 struct IndexMetadata {
21 int64 id;
22 mojo.common.mojom.String16 name;
23 KeyPath key_path;
24 bool unique;
25 bool multi_entry;
26 };
27
28 struct ObjectStoreMetadata {
29 int64 id;
30 mojo.common.mojom.String16 name;
31 KeyPath key_path;
32 bool auto_increment;
33 int64 max_index_id;
34 array<IndexMetadata> indexes;
35 };
36
37 struct DatabaseMetadata {
38 int64 id;
39 mojo.common.mojom.String16 name;
40 int64 version;
41 int64 max_object_store_id;
42 array<ObjectStoreMetadata> object_stores;
43 };
44
45 interface Callbacks {
46 Blocked(int64 existing_version);
47 Error(int32 code, mojo.common.mojom.String16 message);
48 SuccessDatabase(int32 database_id, DatabaseMetadata metadata);
49 SuccessInteger(int64 value);
50 SuccessStringList(array<mojo.common.mojom.String16> value);
51 UpgradeNeeded(int32 database_id, int64 old_version, DataLoss data_loss,
52 string data_loss_message, DatabaseMetadata db_metadata);
53 };
54
55 interface DatabaseCallbacks {
56 ForcedClose();
57 VersionChange(int64 old_version, int64 new_version);
58 Abort(int64 transaction_id, int32 code,
59 mojo.common.mojom.String16 message);
60 Complete(int64 transaction_id);
61 };
62
63 interface Factory {
64 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
65 Open(int32 worker_thread, associated Callbacks callbacks,
66 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin,
67 mojo.common.mojom.String16 name, int64 version, int64 transaction_id);
68 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin,
69 mojo.common.mojom.String16 name);
70 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698