| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 * @param {boolean} available | 189 * @param {boolean} available |
| 190 */ | 190 */ |
| 191 setDrawerEditorAvailable: function(available) | 191 setDrawerEditorAvailable: function(available) |
| 192 { | 192 { |
| 193 this._drawer.setDrawerEditorAvailable(available); | 193 this._drawer.setDrawerEditorAvailable(available); |
| 194 }, | 194 }, |
| 195 | 195 |
| 196 _tabSelected: function() | 196 _tabSelected: function() |
| 197 { | 197 { |
| 198 var panelName = this._tabbedPane.selectedTabId; | 198 var panelName = this._tabbedPane.selectedTabId; |
| 199 if (!panelName) |
| 200 return; |
| 199 var panel = this._panelDescriptors[this._tabbedPane.selectedTabId].panel
(); | 201 var panel = this._panelDescriptors[this._tabbedPane.selectedTabId].panel
(); |
| 200 this._tabbedPane.changeTabView(panelName, panel); | 202 this._tabbedPane.changeTabView(panelName, panel); |
| 201 | 203 |
| 202 this._currentPanel = panel; | 204 this._currentPanel = panel; |
| 203 this._lastActivePanelSetting.set(panel.name); | 205 this._lastActivePanelSetting.set(panel.name); |
| 204 this._pushToHistory(panel.name); | 206 this._pushToHistory(panel.name); |
| 205 WebInspector.userMetrics.panelShown(panel.name); | 207 WebInspector.userMetrics.panelShown(panel.name); |
| 206 panel.focus(); | 208 panel.focus(); |
| 207 }, | 209 }, |
| 208 | 210 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 /** | 254 /** |
| 253 * @param {string} id | 255 * @param {string} id |
| 254 * @param {boolean=} immediate | 256 * @param {boolean=} immediate |
| 255 */ | 257 */ |
| 256 showViewInDrawer: function(id, immediate) | 258 showViewInDrawer: function(id, immediate) |
| 257 { | 259 { |
| 258 this._drawer.showView(id, immediate); | 260 this._drawer.showView(id, immediate); |
| 259 }, | 261 }, |
| 260 | 262 |
| 261 /** | 263 /** |
| 262 * @return {string} | 264 * @return {?string} |
| 263 */ | 265 */ |
| 264 selectedViewInDrawer: function() | 266 selectedViewInDrawer: function() |
| 265 { | 267 { |
| 266 return this._drawer.selectedViewId(); | 268 return this._drawer.selectedViewId(); |
| 267 }, | 269 }, |
| 268 | 270 |
| 269 closeDrawer: function() | 271 closeDrawer: function() |
| 270 { | 272 { |
| 271 this._drawer.closeDrawer(); | 273 this._drawer.closeDrawer(); |
| 272 }, | 274 }, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 window.addEventListener("scroll", this._onScrollBound, false); | 508 window.addEventListener("scroll", this._onScrollBound, false); |
| 507 else | 509 else |
| 508 window.removeEventListener("scroll", this._onScrollBound, false); | 510 window.removeEventListener("scroll", this._onScrollBound, false); |
| 509 | 511 |
| 510 WebInspector.VBox.prototype.doResize.call(this); | 512 WebInspector.VBox.prototype.doResize.call(this); |
| 511 this._onScroll(); | 513 this._onScroll(); |
| 512 }, | 514 }, |
| 513 | 515 |
| 514 __proto__: WebInspector.VBox.prototype | 516 __proto__: WebInspector.VBox.prototype |
| 515 }; | 517 }; |
| OLD | NEW |