OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 | 185 |
186 /** | 186 /** |
187 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId | 187 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
188 */ | 188 */ |
189 refreshDatabase(databaseId) { | 189 refreshDatabase(databaseId) { |
190 this._loadDatabase(databaseId); | 190 this._loadDatabase(databaseId); |
191 } | 191 } |
192 | 192 |
193 /** | 193 /** |
194 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId | 194 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
195 */ | |
196 refreshDatabaseView(databaseId) { | |
dgozman
2017/05/24 23:38:47
Should this actually be merged with method above?
kristipark
2017/05/26 01:09:28
Yes, changed to use this method to refresh instead
| |
197 this.dispatchEventToListeners(Resources.IndexedDBModel.Events.DatabaseRefres hed, {databaseId: databaseId}); | |
198 } | |
199 | |
200 /** | |
201 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId | |
195 * @param {string} objectStoreName | 202 * @param {string} objectStoreName |
196 * @param {function()} callback | 203 * @param {function()} callback |
197 */ | 204 */ |
198 clearObjectStore(databaseId, objectStoreName, callback) { | 205 clearObjectStore(databaseId, objectStoreName, callback) { |
199 this._agent.clearObjectStore(databaseId.securityOrigin, databaseId.name, obj ectStoreName, callback); | 206 this._agent.clearObjectStore(databaseId.securityOrigin, databaseId.name, obj ectStoreName, callback); |
200 } | 207 } |
201 | 208 |
202 /** | 209 /** |
203 * @param {!Common.Event} event | 210 * @param {!Common.Event} event |
204 */ | 211 */ |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
432 NullType: 'null', | 439 NullType: 'null', |
433 StringType: 'string', | 440 StringType: 'string', |
434 ArrayType: 'array' | 441 ArrayType: 'array' |
435 }; | 442 }; |
436 | 443 |
437 | 444 |
438 /** @enum {symbol} */ | 445 /** @enum {symbol} */ |
439 Resources.IndexedDBModel.Events = { | 446 Resources.IndexedDBModel.Events = { |
440 DatabaseAdded: Symbol('DatabaseAdded'), | 447 DatabaseAdded: Symbol('DatabaseAdded'), |
441 DatabaseRemoved: Symbol('DatabaseRemoved'), | 448 DatabaseRemoved: Symbol('DatabaseRemoved'), |
442 DatabaseLoaded: Symbol('DatabaseLoaded') | 449 DatabaseLoaded: Symbol('DatabaseLoaded'), |
450 DatabaseRefreshed: Symbol('DatabaseRefreshed') | |
443 }; | 451 }; |
444 | 452 |
445 /** | 453 /** |
446 * @unrestricted | 454 * @unrestricted |
447 */ | 455 */ |
448 Resources.IndexedDBModel.Entry = class { | 456 Resources.IndexedDBModel.Entry = class { |
449 /** | 457 /** |
450 * @param {!SDK.RemoteObject} key | 458 * @param {!SDK.RemoteObject} key |
451 * @param {!SDK.RemoteObject} primaryKey | 459 * @param {!SDK.RemoteObject} primaryKey |
452 * @param {!SDK.RemoteObject} value | 460 * @param {!SDK.RemoteObject} value |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 } | 546 } |
539 | 547 |
540 /** | 548 /** |
541 * @return {string} | 549 * @return {string} |
542 */ | 550 */ |
543 get keyPathString() { | 551 get keyPathString() { |
544 return /** @type {string}*/ ( | 552 return /** @type {string}*/ ( |
545 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); | 553 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); |
546 } | 554 } |
547 }; | 555 }; |
OLD | NEW |