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

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

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Allow cpp_only to be set by the invoker. 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 enum DataLoss {
15 None = 0,
16 Total,
17 };
18
19 [Native]
20 struct KeyPath;
21
22 struct IndexMetadata {
23 int64 id;
24 mojo.common.mojom.String16 name;
25 KeyPath key_path;
26 bool unique;
27 bool multi_entry;
28 };
29
30 struct ObjectStoreMetadata {
31 int64 id;
32 mojo.common.mojom.String16 name;
33 KeyPath key_path;
34 bool auto_increment;
35 int64 max_index_id;
36 array<IndexMetadata> indexes;
37 };
38
39 struct DatabaseMetadata {
40 int64 id;
41 mojo.common.mojom.String16 name;
42 int64 version;
43 int64 max_object_store_id;
44 array<ObjectStoreMetadata> object_stores;
45 };
46
47 interface Callbacks {
Ken Rockot(use gerrit already) 2016/09/28 20:06:44 I see that this is mirroring the existing implemen
Reilly Grant (use Gerrit) 2016/09/29 06:44:50 Most messages will only generate one response but
Ken Rockot(use gerrit already) 2016/09/29 22:37:50 OK. I still think it's weird, and I'd prefer to no
48 Blocked(int64 existing_version);
49 Error(int32 code, mojo.common.mojom.String16 message);
50 SuccessDatabase(int32 database_id, DatabaseMetadata metadata);
51 SuccessInteger(int64 value);
52 SuccessStringList(array<mojo.common.mojom.String16> value);
53 UpgradeNeeded(int32 database_id, int64 old_version, DataLoss data_loss,
54 string data_loss_message, DatabaseMetadata db_metadata);
55 };
56
57 interface DatabaseCallbacks {
58 ForcedClose();
59 VersionChange(int64 old_version, int64 new_version);
60 Abort(int64 transaction_id, int32 code,
61 mojo.common.mojom.String16 message);
62 Complete(int64 transaction_id);
63 };
64
65 interface Factory {
66 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
67 Open(int32 worker_thread, associated Callbacks callbacks,
68 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin,
69 mojo.common.mojom.String16 name, int64 version, int64 transaction_id);
70 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin,
71 mojo.common.mojom.String16 name);
72 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698