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

Unified Diff: content/common/indexed_db/indexed_db.mojom

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Require explicit wrapping when discarding map keys. 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 side-by-side diff with in-line comments
Download patch
Index: content/common/indexed_db/indexed_db.mojom
diff --git a/content/common/indexed_db/indexed_db.mojom b/content/common/indexed_db/indexed_db.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..17051078df8dd37c8ac129c8a06a820ae6605db7
--- /dev/null
+++ b/content/common/indexed_db/indexed_db.mojom
@@ -0,0 +1,78 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO: This will move to //third_party/WebKit when //content/child/indexed_db
+// is deleted but for now this will depend on //content/common types and so
+// so belongs here.
+
+module indexed_db.mojom;
+
+import "mojo/common/common_custom_types.mojom";
+import "url/mojo/origin.mojom";
+
+[Native]
+enum DataLoss;
+
+[Native]
+struct KeyPath;
+
+struct IndexMetadata {
+ int64 id;
+ mojo.common.mojom.String16 name;
+ KeyPath key_path;
+ bool unique;
+ bool multi_entry;
+};
+
+struct ObjectStoreMetadata {
+ int64 id;
+ mojo.common.mojom.String16 name;
+ KeyPath key_path;
+ bool auto_increment;
+ int64 max_index_id;
+ array<IndexMetadata> indexes;
+};
+
+struct DatabaseMetadata {
+ int64 id;
+ mojo.common.mojom.String16 name;
+ int64 version;
+ int64 max_object_store_id;
+ array<ObjectStoreMetadata> object_stores;
+};
+
+interface Callbacks {
+ Error(int32 code, mojo.common.mojom.String16 message);
+
+ // Factory::GetDatabaseNames
+ SuccessStringList(array<mojo.common.mojom.String16> value);
+
+ // Factory::Open / DeleteDatabase
+ Blocked(int64 existing_version);
+
+ // Factory::Open
+ UpgradeNeeded(int32 database_id, int64 old_version, DataLoss data_loss,
+ string data_loss_message, DatabaseMetadata db_metadata);
+ SuccessDatabase(int32 database_id, DatabaseMetadata metadata);
+
+ // Factory::DeleteDatabase
+ SuccessInteger(int64 value);
+};
+
+interface DatabaseCallbacks {
dcheng 2016/10/17 05:33:44 Mind documenting the Callbacks and DatabaseCallbac
Reilly Grant (use Gerrit) 2016/10/19 00:36:51 The fact that these are just two large interfaces
+ ForcedClose();
+ VersionChange(int64 old_version, int64 new_version);
+ Abort(int64 transaction_id, int32 code,
+ mojo.common.mojom.String16 message);
+ Complete(int64 transaction_id);
+};
+
+interface Factory {
+ GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
+ Open(int32 worker_thread, associated Callbacks callbacks,
+ associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin,
+ mojo.common.mojom.String16 name, int64 version, int64 transaction_id);
+ DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin,
+ mojo.common.mojom.String16 name);
+};

Powered by Google App Engine
This is Rietveld 408576698