| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 closeDrawer: function() | 153 closeDrawer: function() |
| 154 { | 154 { |
| 155 if (!this.isShowing()) | 155 if (!this.isShowing()) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 WebInspector.restoreFocusFromElement(this.element); | 158 WebInspector.restoreFocusFromElement(this.element); |
| 159 this._splitView.hideSidebar(true); | 159 this._splitView.hideSidebar(true); |
| 160 }, | 160 }, |
| 161 | 161 |
| 162 /** | 162 /** |
| 163 * @return {!WebInspector.View} view | 163 * @return {?WebInspector.View} view |
| 164 */ | 164 */ |
| 165 _visibleView: function() | 165 _visibleView: function() |
| 166 { | 166 { |
| 167 return this._tabbedPane.visibleView; | 167 return this._tabbedPane.visibleView; |
| 168 }, | 168 }, |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * @param {!WebInspector.Event} event | 171 * @param {!WebInspector.Event} event |
| 172 */ | 172 */ |
| 173 _tabSelected: function(event) | 173 _tabSelected: function(event) |
| 174 { | 174 { |
| 175 var tabId = this._tabbedPane.selectedTabId; | 175 var tabId = this._tabbedPane.selectedTabId; |
| 176 if (event.data["isUserGesture"] && !this._tabbedPane.isTabCloseable(tabI
d)) | 176 if (tabId && event.data["isUserGesture"] && !this._tabbedPane.isTabClose
able(tabId)) |
| 177 this._lastSelectedViewSetting.set(tabId); | 177 this._lastSelectedViewSetting.set(tabId); |
| 178 }, | 178 }, |
| 179 | 179 |
| 180 toggle: function() | 180 toggle: function() |
| 181 { | 181 { |
| 182 if (this._toggleDrawerButton.toggled) | 182 if (this._toggleDrawerButton.toggled) |
| 183 this.closeDrawer(); | 183 this.closeDrawer(); |
| 184 else | 184 else |
| 185 this.showDrawer(); | 185 this.showDrawer(); |
| 186 }, | 186 }, |
| 187 | 187 |
| 188 /** | 188 /** |
| 189 * @return {boolean} | 189 * @return {boolean} |
| 190 */ | 190 */ |
| 191 visible: function() | 191 visible: function() |
| 192 { | 192 { |
| 193 return this._toggleDrawerButton.toggled; | 193 return this._toggleDrawerButton.toggled; |
| 194 }, | 194 }, |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * @return {string} | 197 * @return {?string} |
| 198 */ | 198 */ |
| 199 selectedViewId: function() | 199 selectedViewId: function() |
| 200 { | 200 { |
| 201 return this._tabbedPane.selectedTabId; | 201 return this._tabbedPane.selectedTabId; |
| 202 }, | 202 }, |
| 203 | 203 |
| 204 /** | 204 /** |
| 205 * @param {!WebInspector.Event} event | 205 * @param {!WebInspector.Event} event |
| 206 */ | 206 */ |
| 207 _drawerEditorSplitViewShowModeChanged: function(event) | 207 _drawerEditorSplitViewShowModeChanged: function(event) |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 324 } |
| 325 | 325 |
| 326 WebInspector.DrawerEditor.prototype = { | 326 WebInspector.DrawerEditor.prototype = { |
| 327 /** | 327 /** |
| 328 * @return {!WebInspector.View} | 328 * @return {!WebInspector.View} |
| 329 */ | 329 */ |
| 330 view: function() { }, | 330 view: function() { }, |
| 331 | 331 |
| 332 installedIntoDrawer: function() { }, | 332 installedIntoDrawer: function() { }, |
| 333 } | 333 } |
| OLD | NEW |