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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 this._appendTab(/** @type {!Runtime.Extension} */(this._extensions.g
et(id))); | 1370 this._appendTab(/** @type {!Runtime.Extension} */(this._extensions.g
et(id))); |
1371 this._tabbedPane.selectTab(id); | 1371 this._tabbedPane.selectTab(id); |
1372 }, | 1372 }, |
1373 | 1373 |
1374 /** | 1374 /** |
1375 * @param {!WebInspector.Event} event | 1375 * @param {!WebInspector.Event} event |
1376 */ | 1376 */ |
1377 _tabSelected: function(event) | 1377 _tabSelected: function(event) |
1378 { | 1378 { |
1379 var tabId = /** @type {string} */ (event.data.tabId); | 1379 var tabId = /** @type {string} */ (event.data.tabId); |
| 1380 if (!this._extensions.has(tabId)) |
| 1381 return; |
| 1382 |
1380 this._viewForId(tabId); | 1383 this._viewForId(tabId); |
1381 | 1384 |
1382 var descriptor = this._extensions.get(tabId).descriptor(); | 1385 var descriptor = this._extensions.get(tabId).descriptor(); |
1383 if (descriptor["persistence"] === "closeable") { | 1386 if (descriptor["persistence"] === "closeable") { |
1384 var tabs = this._closeableTabSetting.get(); | 1387 var tabs = this._closeableTabSetting.get(); |
1385 if (!tabs[tabId]) { | 1388 if (!tabs[tabId]) { |
1386 tabs[tabId] = true; | 1389 tabs[tabId] = true; |
1387 this._closeableTabSetting.set(tabs); | 1390 this._closeableTabSetting.set(tabs); |
1388 } | 1391 } |
1389 } | 1392 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 function cacheView(object) | 1426 function cacheView(object) |
1424 { | 1427 { |
1425 var view = /** @type {!WebInspector.Widget} */ (object); | 1428 var view = /** @type {!WebInspector.Widget} */ (object); |
1426 if (this._viewCallback && view) | 1429 if (this._viewCallback && view) |
1427 this._viewCallback(id, view); | 1430 this._viewCallback(id, view); |
1428 this._tabbedPane.changeTabView(id, view); | 1431 this._tabbedPane.changeTabView(id, view); |
1429 return view; | 1432 return view; |
1430 } | 1433 } |
1431 } | 1434 } |
1432 } | 1435 } |
OLD | NEW |