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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 console.assert(!this._tabsById.has(id), `Tabbed pane already contains a tab with id '${id}'`); | 200 console.assert(!this._tabsById.has(id), `Tabbed pane already contains a tab with id '${id}'`); |
201 this._tabsById.set(id, tab); | 201 this._tabsById.set(id, tab); |
202 if (index !== undefined) | 202 if (index !== undefined) |
203 this._tabs.splice(index, 0, tab); | 203 this._tabs.splice(index, 0, tab); |
204 else | 204 else |
205 this._tabs.push(tab); | 205 this._tabs.push(tab); |
206 this._tabsHistory.push(tab); | 206 this._tabsHistory.push(tab); |
207 if (this._tabsHistory[0] === tab && this.isShowing()) | 207 if (this._tabsHistory[0] === tab && this.isShowing()) |
208 this.selectTab(tab.id, userGesture); | 208 this.selectTab(tab.id, userGesture); |
209 this._updateTabElements(); | 209 this._updateTabElements(); |
210 this.dispatchEventToListeners(UI.TabbedPane.Events.TabOrderChanged, this._ta bs); | |
dgozman
2017/05/15 17:03:36
Looks like a band-aid fix. Instead, client should
einbinder
2017/05/23 00:12:25
Done.
| |
210 } | 211 } |
211 | 212 |
212 /** | 213 /** |
213 * @param {string} id | 214 * @param {string} id |
214 * @param {boolean=} userGesture | 215 * @param {boolean=} userGesture |
215 */ | 216 */ |
216 closeTab(id, userGesture) { | 217 closeTab(id, userGesture) { |
217 this.closeTabs([id], userGesture); | 218 this.closeTabs([id], userGesture); |
218 } | 219 } |
219 | 220 |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1225 * @param {!Array.<string>} ids | 1226 * @param {!Array.<string>} ids |
1226 */ | 1227 */ |
1227 closeTabs(tabbedPane, ids) {}, | 1228 closeTabs(tabbedPane, ids) {}, |
1228 | 1229 |
1229 /** | 1230 /** |
1230 * @param {string} tabId | 1231 * @param {string} tabId |
1231 * @param {!UI.ContextMenu} contextMenu | 1232 * @param {!UI.ContextMenu} contextMenu |
1232 */ | 1233 */ |
1233 onContextMenu(tabId, contextMenu) {} | 1234 onContextMenu(tabId, contextMenu) {} |
1234 }; | 1235 }; |
OLD | NEW |