OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Factory::Open / DeleteDatabase | 104 // Factory::Open / DeleteDatabase |
105 Blocked(int64 existing_version); | 105 Blocked(int64 existing_version); |
106 | 106 |
107 // Factory::Open | 107 // Factory::Open |
108 UpgradeNeeded(associated Database database, int64 old_version, | 108 UpgradeNeeded(associated Database database, int64 old_version, |
109 DataLoss data_loss, string data_loss_message, | 109 DataLoss data_loss, string data_loss_message, |
110 DatabaseMetadata db_metadata); | 110 DatabaseMetadata db_metadata); |
111 SuccessDatabase(associated Database? database, DatabaseMetadata metadata); | 111 SuccessDatabase(associated Database? database, DatabaseMetadata metadata); |
112 | 112 |
113 // Database::OpenCursor | 113 // Database::OpenCursor |
114 SuccessCursor(int32 cursor_id, Key key, Key primary_key, Value? value); | 114 SuccessCursor(associated Cursor cursor, |
| 115 Key key, |
| 116 Key primary_key, |
| 117 Value? value); |
115 | 118 |
116 // Database::Get / Cursor::Advance | 119 // Database::Get / Cursor::Advance |
117 SuccessValue(ReturnValue? value); | 120 SuccessValue(ReturnValue? value); |
118 | 121 |
| 122 // Cursor::Continue / Advance |
| 123 SuccessCursorContinue(Key key, Key primary_key, Value? value); |
| 124 |
| 125 // Cursor::Prefetch |
| 126 SuccessCursorPrefetch(array<Key> keys, |
| 127 array<Key> primary_keys, |
| 128 array<Value> values); |
| 129 |
119 // Database::GetAll | 130 // Database::GetAll |
120 SuccessArray(array<ReturnValue> values); | 131 SuccessArray(array<ReturnValue> values); |
121 | 132 |
122 // Database::Put / Cursor::Update | 133 // Database::Put / Cursor::Update |
123 SuccessKey(Key key); | 134 SuccessKey(Key key); |
124 | 135 |
125 // Database::Count / DeleteRange | 136 // Database::Count / DeleteRange |
126 // Factory::DeleteDatabase | 137 // Factory::DeleteDatabase |
127 SuccessInteger(int64 value); | 138 SuccessInteger(int64 value); |
128 | 139 |
129 // Cursor::Continue / Advance | 140 // Cursor::Continue / Advance |
130 Success(); | 141 Success(); |
131 }; | 142 }; |
132 | 143 |
133 // The DatabaseCallbacks interface is used to notification of events out of | 144 // The DatabaseCallbacks interface is used to notification of events out of |
134 // band to individual requests. A single instance is used for the lifetime of | 145 // band to individual requests. A single instance is used for the lifetime of |
135 // a database connection. | 146 // a database connection. |
136 interface DatabaseCallbacks { | 147 interface DatabaseCallbacks { |
137 ForcedClose(); | 148 ForcedClose(); |
138 VersionChange(int64 old_version, int64 new_version); | 149 VersionChange(int64 old_version, int64 new_version); |
139 Abort(int64 transaction_id, int32 code, | 150 Abort(int64 transaction_id, int32 code, |
140 mojo.common.mojom.String16 message); | 151 mojo.common.mojom.String16 message); |
141 Complete(int64 transaction_id); | 152 Complete(int64 transaction_id); |
142 }; | 153 }; |
143 | 154 |
| 155 interface Cursor { |
| 156 Advance(uint32 count, associated Callbacks callbacks); |
| 157 Continue(Key key, Key primary_key, associated Callbacks callbacks); |
| 158 Prefetch(int32 count, associated Callbacks callbacks); |
| 159 PrefetchReset(int32 used_prefetches, int32 unused_prefetches, |
| 160 array<string> unused_blob_uuids); |
| 161 }; |
| 162 |
144 interface Database { | 163 interface Database { |
145 CreateObjectStore(int64 transaction_id, | 164 CreateObjectStore(int64 transaction_id, |
146 int64 object_store_id, | 165 int64 object_store_id, |
147 mojo.common.mojom.String16 name, | 166 mojo.common.mojom.String16 name, |
148 KeyPath key_path, | 167 KeyPath key_path, |
149 bool auto_increment); | 168 bool auto_increment); |
150 DeleteObjectStore(int64 transaction_id, | 169 DeleteObjectStore(int64 transaction_id, |
151 int64 object_store_id); | 170 int64 object_store_id); |
152 RenameObjectStore(int64 transaction_id, | 171 RenameObjectStore(int64 transaction_id, |
153 int64 object_store_id, | 172 int64 object_store_id, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 }; | 250 }; |
232 | 251 |
233 interface Factory { | 252 interface Factory { |
234 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); | 253 GetDatabaseNames(associated Callbacks callbacks, url.mojom.Origin origin); |
235 Open(int32 worker_thread, associated Callbacks callbacks, | 254 Open(int32 worker_thread, associated Callbacks callbacks, |
236 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, | 255 associated DatabaseCallbacks database_callbacks, url.mojom.Origin origin, |
237 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); | 256 mojo.common.mojom.String16 name, int64 version, int64 transaction_id); |
238 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, | 257 DeleteDatabase(associated Callbacks callbacks, url.mojom.Origin origin, |
239 mojo.common.mojom.String16 name); | 258 mojo.common.mojom.String16 name); |
240 }; | 259 }; |
OLD | NEW |