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

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

Issue 2902673003: Added a refresh database button on the IndexedDB view. (Closed)
Patch Set: 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
eostroukhov 2017/05/23 20:29:55 "refreshDatabase"?
kristipark 2017/05/23 20:53:58 Using refreshDatabase causes the tab to crash (the
eostroukhov 2017/05/23 20:57:32 There shouldn't be any crashes - can you open a bu
197 this.dispatchEventToListeners(
198 Resources.IndexedDBModel.Events.DatabaseRefreshed, {model: this, databas eId: databaseId});
eostroukhov 2017/05/23 20:29:55 Don't pass model here - just the databaseId.
kristipark 2017/05/23 20:53:58 Done.
199 }
200
201 /**
202 * @param {!Resources.IndexedDBModel.DatabaseId} databaseId
195 * @param {string} objectStoreName 203 * @param {string} objectStoreName
196 * @param {function()} callback 204 * @param {function()} callback
197 */ 205 */
198 clearObjectStore(databaseId, objectStoreName, callback) { 206 clearObjectStore(databaseId, objectStoreName, callback) {
199 this._agent.clearObjectStore(databaseId.securityOrigin, databaseId.name, obj ectStoreName, callback); 207 this._agent.clearObjectStore(databaseId.securityOrigin, databaseId.name, obj ectStoreName, callback);
200 } 208 }
201 209
202 /** 210 /**
203 * @param {!Common.Event} event 211 * @param {!Common.Event} event
204 */ 212 */
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 NullType: 'null', 440 NullType: 'null',
433 StringType: 'string', 441 StringType: 'string',
434 ArrayType: 'array' 442 ArrayType: 'array'
435 }; 443 };
436 444
437 445
438 /** @enum {symbol} */ 446 /** @enum {symbol} */
439 Resources.IndexedDBModel.Events = { 447 Resources.IndexedDBModel.Events = {
440 DatabaseAdded: Symbol('DatabaseAdded'), 448 DatabaseAdded: Symbol('DatabaseAdded'),
441 DatabaseRemoved: Symbol('DatabaseRemoved'), 449 DatabaseRemoved: Symbol('DatabaseRemoved'),
442 DatabaseLoaded: Symbol('DatabaseLoaded') 450 DatabaseLoaded: Symbol('DatabaseLoaded'),
451 DatabaseRefreshed: Symbol('DatabaseRefreshed')
443 }; 452 };
444 453
445 /** 454 /**
446 * @unrestricted 455 * @unrestricted
447 */ 456 */
448 Resources.IndexedDBModel.Entry = class { 457 Resources.IndexedDBModel.Entry = class {
449 /** 458 /**
450 * @param {!SDK.RemoteObject} key 459 * @param {!SDK.RemoteObject} key
451 * @param {!SDK.RemoteObject} primaryKey 460 * @param {!SDK.RemoteObject} primaryKey
452 * @param {!SDK.RemoteObject} value 461 * @param {!SDK.RemoteObject} value
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 547 }
539 548
540 /** 549 /**
541 * @return {string} 550 * @return {string}
542 */ 551 */
543 get keyPathString() { 552 get keyPathString() {
544 return /** @type {string}*/ ( 553 return /** @type {string}*/ (
545 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath))); 554 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}* / (this.keyPath)));
546 } 555 }
547 }; 556 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698