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

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

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: Moved transaction creation to SendObservations Created 3 years, 11 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO: This will move to //third_party/WebKit when //content/child/indexed_db 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 6 // is deleted but for now this will depend on //content/common types and so
7 // so belongs here. 7 // so belongs here.
8 8
9 module indexed_db.mojom; 9 module indexed_db.mojom;
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 struct ReturnValue { 141 struct ReturnValue {
142 Value value; 142 Value value;
143 Key primary_key; 143 Key primary_key;
144 KeyPath key_path; 144 KeyPath key_path;
145 }; 145 };
146 146
147 struct Observation { 147 struct Observation {
148 int64 object_store_id; 148 int64 object_store_id;
149 OperationType type; 149 OperationType type;
150 KeyRange key_range; 150 KeyRange key_range;
151 Value? value;
152 };
153
154 struct ObserverTransaction {
155 int64 id;
156 array<int64> scope;
151 }; 157 };
152 158
153 struct ObserverChanges { 159 struct ObserverChanges {
154 map<int32, array<int32>> observation_index_map; 160 map<int32, array<int32>> observation_index_map;
161 map<int32, ObserverTransaction> transaction_map;
155 array<Observation> observations; 162 array<Observation> observations;
156 }; 163 };
157 164
158 // The Callbacks interface is used to return results for individual requests. 165 // The Callbacks interface is used to return results for individual requests.
159 // Some requests may return multiple results before completion, such as 166 // Some requests may return multiple results before completion, such as
160 // UpgradeNeeded before SuccessDatabase. 167 // UpgradeNeeded before SuccessDatabase.
161 // 168 //
162 // TODO(https://crbug.com/627484): Many of these could be replaced with 169 // TODO(https://crbug.com/627484): Many of these could be replaced with
163 // replies associated with particular messages. 170 // replies associated with particular messages.
164 interface Callbacks { 171 interface Callbacks {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 }; 324 };
318 325
319 interface Factory { 326 interface Factory {
320 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); 327 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin);
321 Open(associated Callbacks callbacks, 328 Open(associated Callbacks callbacks,
322 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, 329 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin,
323 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); 330 mojo.common.mojom.String16 name, int64 version, int64 transaction_id);
324 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, 331 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin,
325 mojo.common.mojom.String16 name); 332 mojo.common.mojom.String16 name);
326 }; 333 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698