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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBModel.js

Issue 2914293002: [IndexedDB] [DevTools] Right-click 'Refresh' on database now updates object store view, also fixed … (Closed)
Patch Set: Using await instead Created 3 years, 6 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 /* 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 /** 168 /**
169 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId 169 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId
170 */ 170 */
171 async deleteDatabase(databaseId) { 171 async deleteDatabase(databaseId) {
172 if (!this._enabled) 172 if (!this._enabled)
173 return; 173 return;
174 await this._agent.deleteDatabase(databaseId.securityOrigin, databaseId.name) ; 174 await this._agent.deleteDatabase(databaseId.securityOrigin, databaseId.name) ;
175 this._loadDatabaseNames(databaseId.securityOrigin); 175 this._loadDatabaseNames(databaseId.securityOrigin);
176 } 176 }
177 177
178 refreshDatabaseNames() { 178 async refreshDatabaseNames() {
179 for (var securityOrigin in this._databaseNamesBySecurityOrigin) 179 for (var securityOrigin in this._databaseNamesBySecurityOrigin)
180 this._loadDatabaseNames(securityOrigin); 180 await this._loadDatabaseNames(securityOrigin);
181 this.dispatchEventToListeners(Resources.IndexedDBModel.Events.DatabaseNamesR efreshed);
181 } 182 }
182 183
183 /** 184 /**
184 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId 185 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId
185 */ 186 */
186 refreshDatabase(databaseId) { 187 refreshDatabase(databaseId) {
187 this._loadDatabase(databaseId); 188 this._loadDatabase(databaseId);
188 } 189 }
189 190
190 /** 191 /**
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 Resources.IndexedDBModel.KeyPathTypes = { 408 Resources.IndexedDBModel.KeyPathTypes = {
408 NullType: 'null', 409 NullType: 'null',
409 StringType: 'string', 410 StringType: 'string',
410 ArrayType: 'array' 411 ArrayType: 'array'
411 }; 412 };
412 413
413 /** @enum {symbol} */ 414 /** @enum {symbol} */
414 Resources.IndexedDBModel.Events = { 415 Resources.IndexedDBModel.Events = {
415 DatabaseAdded: Symbol('DatabaseAdded'), 416 DatabaseAdded: Symbol('DatabaseAdded'),
416 DatabaseRemoved: Symbol('DatabaseRemoved'), 417 DatabaseRemoved: Symbol('DatabaseRemoved'),
417 DatabaseLoaded: Symbol('DatabaseLoaded') 418 DatabaseLoaded: Symbol('DatabaseLoaded'),
419 DatabaseNamesRefreshed: Symbol('DatabaseNamesRefreshed')
418 }; 420 };
419 421
420 /** 422 /**
421 * @unrestricted 423 * @unrestricted
422 */ 424 */
423 Resources.IndexedDBModel.Entry = class { 425 Resources.IndexedDBModel.Entry = class {
424 /** 426 /**
425 * @param {!SDK.RemoteObject} key 427 * @param {!SDK.RemoteObject} key
426 * @param {!SDK.RemoteObject} primaryKey 428 * @param {!SDK.RemoteObject} primaryKey
427 * @param {!SDK.RemoteObject} value 429 * @param {!SDK.RemoteObject} value
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 515 }
514 516
515 /** 517 /**
516 * @return {string} 518 * @return {string}
517 */ 519 */
518 get keyPathString() { 520 get keyPathString() {
519 return /** @type {string}*/ ( 521 return /** @type {string}*/ (
520 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); 522 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath)));
521 } 523 }
522 }; 524 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698