| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 { | 274 { |
| 275 var panelName = this._tabbedPane.selectedTabId; | 275 var panelName = this._tabbedPane.selectedTabId; |
| 276 if (!panelName) | 276 if (!panelName) |
| 277 return; | 277 return; |
| 278 | 278 |
| 279 this.showPanel(panelName); | 279 this.showPanel(panelName); |
| 280 }, | 280 }, |
| 281 | 281 |
| 282 /** | 282 /** |
| 283 * @param {!WebInspector.Panel} panel | 283 * @param {!WebInspector.Panel} panel |
| 284 * @param {boolean=} suppressBringToFront |
| 284 * @return {!WebInspector.Panel} | 285 * @return {!WebInspector.Panel} |
| 285 */ | 286 */ |
| 286 setCurrentPanel: function(panel) | 287 setCurrentPanel: function(panel, suppressBringToFront) |
| 287 { | 288 { |
| 288 delete this._panelForShowPromise; | 289 delete this._panelForShowPromise; |
| 289 | 290 |
| 290 if (this._currentPanelLocked) { | 291 if (this._currentPanelLocked) { |
| 291 console.error("Current panel is locked"); | 292 console.error("Current panel is locked"); |
| 292 return this._currentPanel; | 293 return this._currentPanel; |
| 293 } | 294 } |
| 294 InspectorFrontendHost.bringToFront(); | 295 |
| 296 if (!suppressBringToFront) |
| 297 InspectorFrontendHost.bringToFront(); |
| 295 | 298 |
| 296 if (this._currentPanel === panel) | 299 if (this._currentPanel === panel) |
| 297 return panel; | 300 return panel; |
| 298 | 301 |
| 299 this._currentPanel = panel; | 302 this._currentPanel = panel; |
| 300 if (!this._panels[panel.name]) | 303 if (!this._panels[panel.name]) |
| 301 this._panels[panel.name] = panel; | 304 this._panels[panel.name] = panel; |
| 302 this._tabbedPane.changeTabView(panel.name, panel); | 305 this._tabbedPane.changeTabView(panel.name, panel); |
| 303 this._tabbedPane.removeEventListener(WebInspector.TabbedPane.EventTypes.
TabSelected, this._tabSelected, this); | 306 this._tabbedPane.removeEventListener(WebInspector.TabbedPane.EventTypes.
TabSelected, this._tabSelected, this); |
| 304 this._tabbedPane.selectTab(panel.name); | 307 this._tabbedPane.selectTab(panel.name); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 * @param {string} actionId | 530 * @param {string} actionId |
| 528 */ | 531 */ |
| 529 handleAction: function(context, actionId) | 532 handleAction: function(context, actionId) |
| 530 { | 533 { |
| 531 if (WebInspector.inspectorView.drawerVisible()) | 534 if (WebInspector.inspectorView.drawerVisible()) |
| 532 WebInspector.inspectorView.closeDrawer(); | 535 WebInspector.inspectorView.closeDrawer(); |
| 533 else | 536 else |
| 534 WebInspector.inspectorView.showDrawer(); | 537 WebInspector.inspectorView.showDrawer(); |
| 535 } | 538 } |
| 536 } | 539 } |
| OLD | NEW |