| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 * @param {!UI.Widget} view | 184 * @param {!UI.Widget} view |
| 185 * @param {string=} tabTooltip | 185 * @param {string=} tabTooltip |
| 186 * @param {boolean=} userGesture | 186 * @param {boolean=} userGesture |
| 187 * @param {boolean=} isCloseable | 187 * @param {boolean=} isCloseable |
| 188 * @param {number=} index | 188 * @param {number=} index |
| 189 */ | 189 */ |
| 190 appendTab(id, tabTitle, view, tabTooltip, userGesture, isCloseable, index) { | 190 appendTab(id, tabTitle, view, tabTooltip, userGesture, isCloseable, index) { |
| 191 isCloseable = typeof isCloseable === 'boolean' ? isCloseable : this._closeab
leTabs; | 191 isCloseable = typeof isCloseable === 'boolean' ? isCloseable : this._closeab
leTabs; |
| 192 var tab = new UI.TabbedPaneTab(this, id, tabTitle, isCloseable, view, tabToo
ltip); | 192 var tab = new UI.TabbedPaneTab(this, id, tabTitle, isCloseable, view, tabToo
ltip); |
| 193 tab.setDelegate(this._delegate); | 193 tab.setDelegate(this._delegate); |
| 194 console.assert(!this._tabsById[id], `Tabbed pane already contains a tab with
id '${id}'`); |
| 194 this._tabsById[id] = tab; | 195 this._tabsById[id] = tab; |
| 195 if (index !== undefined) | 196 if (index !== undefined) |
| 196 this._tabs.splice(index, 0, tab); | 197 this._tabs.splice(index, 0, tab); |
| 197 else | 198 else |
| 198 this._tabs.push(tab); | 199 this._tabs.push(tab); |
| 199 this._tabsHistory.push(tab); | 200 this._tabsHistory.push(tab); |
| 200 view.attach(this); | 201 view.attach(this); |
| 201 if (this._tabsHistory[0] === tab && this.isShowing()) | 202 if (this._tabsHistory[0] === tab && this.isShowing()) |
| 202 this.selectTab(tab.id, userGesture); | 203 this.selectTab(tab.id, userGesture); |
| 203 this._updateTabElements(); | 204 this._updateTabElements(); |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 * @param {!Array.<string>} ids | 1211 * @param {!Array.<string>} ids |
| 1211 */ | 1212 */ |
| 1212 closeTabs(tabbedPane, ids) {}, | 1213 closeTabs(tabbedPane, ids) {}, |
| 1213 | 1214 |
| 1214 /** | 1215 /** |
| 1215 * @param {string} tabId | 1216 * @param {string} tabId |
| 1216 * @param {!UI.ContextMenu} contextMenu | 1217 * @param {!UI.ContextMenu} contextMenu |
| 1217 */ | 1218 */ |
| 1218 onContextMenu(tabId, contextMenu) {} | 1219 onContextMenu(tabId, contextMenu) {} |
| 1219 }; | 1220 }; |
| OLD | NEW |