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

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

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Rebased. 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 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
index eee826d2e959e772ca7e2d4ebe2a37d7792f3002..07a2600121f6de5952fd0220aa7678e793e1050b 100644
--- a/content/common/indexed_db/indexed_db.mojom
+++ b/content/common/indexed_db/indexed_db.mojom
@@ -64,6 +64,13 @@ struct KeyRange {
bool upper_open;
};
+enum OperationType {
+ Add,
+ Put,
+ Delete,
+ Clear,
+};
+
enum PutMode {
AddOrUpdate,
AddOnly,
@@ -135,6 +142,17 @@ struct ReturnValue {
KeyPath key_path;
};
+struct Observation {
+ int64 object_store_id;
+ OperationType type;
+ KeyRange key_range;
+};
+
+struct ObserverChanges {
+ map<int32, array<int32>> observation_index_map;
jsbell 2016/11/21 19:45:22 Can we document what this is a map from/to? IIRC
+ array<Observation> observations;
+};
+
// The Callbacks interface is used to return results for individual requests.
// Some requests may return multiple results before completion, such as
// UpgradeNeeded before SuccessDatabase.
@@ -196,6 +214,7 @@ interface DatabaseCallbacks {
Abort(int64 transaction_id, int32 code,
mojo.common.mojom.String16 message);
Complete(int64 transaction_id);
+ Changes(ObserverChanges changes);
};
interface Cursor {
@@ -297,7 +316,7 @@ interface Database {
interface Factory {
GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
- Open(int32 worker_thread, associated Callbacks callbacks,
+ Open(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,

Powered by Google App Engine
This is Rietveld 408576698