Chromium Code Reviews| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 var bodySection = this._reportView.appendSection(''); | 47 var bodySection = this._reportView.appendSection(''); |
| 48 this._securityOriginElement = bodySection.appendField(Common.UIString('Secur ity origin')); | 48 this._securityOriginElement = bodySection.appendField(Common.UIString('Secur ity origin')); |
| 49 this._versionElement = bodySection.appendField(Common.UIString('Version')); | 49 this._versionElement = bodySection.appendField(Common.UIString('Version')); |
| 50 | 50 |
| 51 var footer = this._reportView.appendSection('').appendRow(); | 51 var footer = this._reportView.appendSection('').appendRow(); |
| 52 this._clearButton = UI.createTextButton( | 52 this._clearButton = UI.createTextButton( |
| 53 Common.UIString('Delete database'), () => this._deleteDatabase(), Common .UIString('Delete database')); | 53 Common.UIString('Delete database'), () => this._deleteDatabase(), Common .UIString('Delete database')); |
| 54 footer.appendChild(this._clearButton); | 54 footer.appendChild(this._clearButton); |
| 55 | 55 |
| 56 this._refreshButton = UI.createTextButton( | |
| 57 Common.UIString('Refresh database'), () => this._refreshDatabaseButtonCl icked(), | |
| 58 Common.UIString('Refresh database')); | |
| 59 footer.appendChild(this._refreshButton); | |
| 60 | |
| 56 this.update(database); | 61 this.update(database); |
| 57 } | 62 } |
| 58 | 63 |
| 59 _refreshDatabase() { | 64 _refreshDatabase() { |
| 60 this._securityOriginElement.textContent = this._database.databaseId.security Origin; | 65 this._securityOriginElement.textContent = this._database.databaseId.security Origin; |
| 61 this._versionElement.textContent = this._database.version; | 66 this._versionElement.textContent = this._database.version; |
| 62 } | 67 } |
| 63 | 68 |
| 69 _refreshDatabaseButtonClicked() { | |
| 70 this._model.refreshDatabase(this._database.databaseId); | |
| 71 this._refreshDatabase(); | |
|
dgozman
2017/05/26 19:10:46
I think there is no need to call this, since model
kristipark
2017/05/26 22:42:16
Done.
| |
| 72 } | |
| 73 | |
| 64 /** | 74 /** |
| 65 * @param {!Resources.IndexedDBModel.Database} database | 75 * @param {!Resources.IndexedDBModel.Database} database |
| 66 */ | 76 */ |
| 67 update(database) { | 77 update(database) { |
| 68 this._database = database; | 78 this._database = database; |
| 69 this._refreshDatabase(); | 79 this._refreshDatabase(); |
| 70 } | 80 } |
| 71 | 81 |
| 72 _deleteDatabase() { | 82 _deleteDatabase() { |
| 73 UI.ConfirmDialog.show( | 83 UI.ConfirmDialog.show( |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 cell.removeChildren(); | 374 cell.removeChildren(); |
| 365 var objectElement = ObjectUI.ObjectPropertiesSection.defaultObjectPresen tation(value, undefined, true); | 375 var objectElement = ObjectUI.ObjectPropertiesSection.defaultObjectPresen tation(value, undefined, true); |
| 366 cell.appendChild(objectElement); | 376 cell.appendChild(objectElement); |
| 367 break; | 377 break; |
| 368 default: | 378 default: |
| 369 } | 379 } |
| 370 | 380 |
| 371 return cell; | 381 return cell; |
| 372 } | 382 } |
| 373 }; | 383 }; |
| OLD | NEW |