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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 /** | 88 /** |
89 * @return {!Array.<string>} | 89 * @return {!Array.<string>} |
90 */ | 90 */ |
91 tabIds: function() | 91 tabIds: function() |
92 { | 92 { |
93 return this._tabs.map(tab => tab._id); | 93 return this._tabs.map(tab => tab._id); |
94 }, | 94 }, |
95 | 95 |
96 /** | 96 /** |
| 97 * @param {string} tabId |
| 98 * @return {number} |
| 99 */ |
| 100 tabIndex: function(tabId) |
| 101 { |
| 102 return this._tabs.findIndex(tab => tab.id === tabId); |
| 103 }, |
| 104 |
| 105 /** |
97 * @return {!Array.<!WebInspector.Widget>} | 106 * @return {!Array.<!WebInspector.Widget>} |
98 */ | 107 */ |
99 tabViews: function() | 108 tabViews: function() |
100 { | 109 { |
101 return this._tabs.map(tab => tab.view); | 110 return this._tabs.map(tab => tab.view); |
102 }, | 111 }, |
103 | 112 |
104 /** | 113 /** |
105 * @param {string} tabId | 114 * @param {string} tabId |
106 * @return {?WebInspector.Widget} | 115 * @return {?WebInspector.Widget} |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 * @param {!Array.<string>} ids | 1260 * @param {!Array.<string>} ids |
1252 */ | 1261 */ |
1253 closeTabs: function(tabbedPane, ids) { }, | 1262 closeTabs: function(tabbedPane, ids) { }, |
1254 | 1263 |
1255 /** | 1264 /** |
1256 * @param {string} tabId | 1265 * @param {string} tabId |
1257 * @param {!WebInspector.ContextMenu} contextMenu | 1266 * @param {!WebInspector.ContextMenu} contextMenu |
1258 */ | 1267 */ |
1259 onContextMenu: function(tabId, contextMenu) { } | 1268 onContextMenu: function(tabId, contextMenu) { } |
1260 } | 1269 } |
OLD | NEW |