| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 _updateChildren() { | 729 _updateChildren() { |
| 730 this.removeChildren(); | 730 this.removeChildren(); |
| 731 | 731 |
| 732 /** | 732 /** |
| 733 * @param {!Array.<string>} tableNames | 733 * @param {!Array.<string>} tableNames |
| 734 * @this {Resources.DatabaseTreeElement} | 734 * @this {Resources.DatabaseTreeElement} |
| 735 */ | 735 */ |
| 736 function tableNamesCallback(tableNames) { | 736 function tableNamesCallback(tableNames) { |
| 737 var tableNamesLength = tableNames.length; | 737 var tableNamesLength = tableNames.length; |
| 738 for (var i = 0; i < tableNamesLength; ++i) | 738 for (var i = 0; i < tableNamesLength; ++i) |
| 739 this.appendChild(new Resources.DatabaseTableTreeElement(this._storagePan
el, this._database, tableNames[i])); | 739 this.appendChild(new Resources.DatabaseTableTreeElement(this._sidebar, t
his._database, tableNames[i])); |
| 740 } | 740 } |
| 741 this._database.getTableNames(tableNamesCallback.bind(this)); | 741 this._database.getTableNames(tableNamesCallback.bind(this)); |
| 742 } | 742 } |
| 743 }; | 743 }; |
| 744 | 744 |
| 745 /** | 745 /** |
| 746 * @unrestricted | 746 * @unrestricted |
| 747 */ | 747 */ |
| 748 Resources.DatabaseTableTreeElement = class extends Resources.BaseStorageTreeElem
ent { | 748 Resources.DatabaseTableTreeElement = class extends Resources.BaseStorageTreeElem
ent { |
| 749 /** |
| 750 * @param {!Resources.ApplicationPanelSidebar} sidebar |
| 751 * @param {!Resources.Database} database |
| 752 * @param {string} tableName |
| 753 */ |
| 749 constructor(sidebar, database, tableName) { | 754 constructor(sidebar, database, tableName) { |
| 750 super(sidebar._panel, tableName, false); | 755 super(sidebar._panel, tableName, false); |
| 751 this._sidebar = sidebar; | 756 this._sidebar = sidebar; |
| 752 this._database = database; | 757 this._database = database; |
| 753 this._tableName = tableName; | 758 this._tableName = tableName; |
| 754 var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item'); | 759 var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item'); |
| 755 this.setLeadingIcons([icon]); | 760 this.setLeadingIcons([icon]); |
| 756 } | 761 } |
| 757 | 762 |
| 758 get itemURL() { | 763 get itemURL() { |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 | 1647 |
| 1643 this.element.classList.add('storage-view'); | 1648 this.element.classList.add('storage-view'); |
| 1644 this._emptyWidget = new UI.EmptyWidget(''); | 1649 this._emptyWidget = new UI.EmptyWidget(''); |
| 1645 this._emptyWidget.show(this.element); | 1650 this._emptyWidget.show(this.element); |
| 1646 } | 1651 } |
| 1647 | 1652 |
| 1648 setText(text) { | 1653 setText(text) { |
| 1649 this._emptyWidget.text = text; | 1654 this._emptyWidget.text = text; |
| 1650 } | 1655 } |
| 1651 }; | 1656 }; |
| OLD | NEW |