| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 this._hideTab(this._currentTab); | 741 this._hideTab(this._currentTab); |
| 742 delete this._currentTab; | 742 delete this._currentTab; |
| 743 } | 743 } |
| 744 | 744 |
| 745 /** | 745 /** |
| 746 * @param {!UI.TabbedPaneTab} tab | 746 * @param {!UI.TabbedPaneTab} tab |
| 747 */ | 747 */ |
| 748 _showTab(tab) { | 748 _showTab(tab) { |
| 749 tab.tabElement.classList.add('selected'); | 749 tab.tabElement.classList.add('selected'); |
| 750 tab.tabElement.setAttribute('aria-selected', 'true'); | 750 tab.tabElement.setAttribute('aria-selected', 'true'); |
| 751 tab.view.showWidget(this.element); | 751 tab.view.showWidget(); |
| 752 this._updateTabSlider(); | 752 this._updateTabSlider(); |
| 753 } | 753 } |
| 754 | 754 |
| 755 _updateTabSlider() { | 755 _updateTabSlider() { |
| 756 if (!this._currentTab || !this._sliderEnabled) | 756 if (!this._currentTab || !this._sliderEnabled) |
| 757 return; | 757 return; |
| 758 var left = 0; | 758 var left = 0; |
| 759 for (var i = 0; i < this._tabs.length && this._currentTab !== this._tabs[i]
&& this._tabs[i]._shown; i++) | 759 for (var i = 0; i < this._tabs.length && this._currentTab !== this._tabs[i]
&& this._tabs[i]._shown; i++) |
| 760 left += this._tabs[i]._measuredWidth; | 760 left += this._tabs[i]._measuredWidth; |
| 761 var sliderWidth = this._currentTab._shown ? this._currentTab._measuredWidth
: this._dropDownButton.offsetWidth; | 761 var sliderWidth = this._currentTab._shown ? this._currentTab._measuredWidth
: this._dropDownButton.offsetWidth; |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 * @param {!Array.<string>} ids | 1210 * @param {!Array.<string>} ids |
| 1211 */ | 1211 */ |
| 1212 closeTabs(tabbedPane, ids) {}, | 1212 closeTabs(tabbedPane, ids) {}, |
| 1213 | 1213 |
| 1214 /** | 1214 /** |
| 1215 * @param {string} tabId | 1215 * @param {string} tabId |
| 1216 * @param {!UI.ContextMenu} contextMenu | 1216 * @param {!UI.ContextMenu} contextMenu |
| 1217 */ | 1217 */ |
| 1218 onContextMenu(tabId, contextMenu) {} | 1218 onContextMenu(tabId, contextMenu) {} |
| 1219 }; | 1219 }; |
| OLD | NEW |