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

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

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Remove unnecessary forward declaration. 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
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/indexed_db/indexed_db.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0143e12ad492fc1eb28c1cf2dbedeb00e9d0b0a9..d5babcaf2de4884920caeeef51cf8af362c7cb8d 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;
+ 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,
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/indexed_db/indexed_db.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698