| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 showDrawer: function() | 109 showDrawer: function() |
| 110 { | 110 { |
| 111 this.showView(this._lastSelectedViewSetting.get()); | 111 this.showView(this._lastSelectedViewSetting.get()); |
| 112 }, | 112 }, |
| 113 | 113 |
| 114 wasShown: function() | 114 wasShown: function() |
| 115 { | 115 { |
| 116 this.showView(this._lastSelectedViewSetting.get()); | 116 this.showView(this._lastSelectedViewSetting.get()); |
| 117 this._toggleDrawerButton.toggled = true; | 117 this._toggleDrawerButton.setToggled(true); |
| 118 this._toggleDrawerButton.title = WebInspector.UIString("Hide drawer."); | 118 this._toggleDrawerButton.setTitle(WebInspector.UIString("Hide drawer."))
; |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 willHide: function() | 121 willHide: function() |
| 122 { | 122 { |
| 123 this._toggleDrawerButton.toggled = false; | 123 this._toggleDrawerButton.setToggled(false); |
| 124 this._toggleDrawerButton.title = WebInspector.UIString("Show drawer."); | 124 this._toggleDrawerButton.setTitle(WebInspector.UIString("Show drawer."))
; |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * @param {boolean=} immediate | 128 * @param {boolean=} immediate |
| 129 */ | 129 */ |
| 130 _innerShow: function(immediate) | 130 _innerShow: function(immediate) |
| 131 { | 131 { |
| 132 if (this.isShowing()) | 132 if (this.isShowing()) |
| 133 return; | 133 return; |
| 134 | 134 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 160 */ | 160 */ |
| 161 _tabSelected: function(event) | 161 _tabSelected: function(event) |
| 162 { | 162 { |
| 163 var tabId = this._tabbedPane.selectedTabId; | 163 var tabId = this._tabbedPane.selectedTabId; |
| 164 if (tabId && event.data["isUserGesture"] && !this._tabbedPane.isTabClose
able(tabId)) | 164 if (tabId && event.data["isUserGesture"] && !this._tabbedPane.isTabClose
able(tabId)) |
| 165 this._lastSelectedViewSetting.set(tabId); | 165 this._lastSelectedViewSetting.set(tabId); |
| 166 }, | 166 }, |
| 167 | 167 |
| 168 toggle: function() | 168 toggle: function() |
| 169 { | 169 { |
| 170 if (this._toggleDrawerButton.toggled) | 170 if (this._toggleDrawerButton.toggled()) |
| 171 this.closeDrawer(); | 171 this.closeDrawer(); |
| 172 else | 172 else |
| 173 this.showDrawer(); | 173 this.showDrawer(); |
| 174 }, | 174 }, |
| 175 | 175 |
| 176 /** | 176 /** |
| 177 * @return {boolean} | 177 * @return {boolean} |
| 178 */ | 178 */ |
| 179 visible: function() | 179 visible: function() |
| 180 { | 180 { |
| 181 return this._toggleDrawerButton.toggled; | 181 return this._toggleDrawerButton.toggled(); |
| 182 }, | 182 }, |
| 183 | 183 |
| 184 /** | 184 /** |
| 185 * @return {?string} | 185 * @return {?string} |
| 186 */ | 186 */ |
| 187 selectedViewId: function() | 187 selectedViewId: function() |
| 188 { | 188 { |
| 189 return this._tabbedPane.selectedTabId; | 189 return this._tabbedPane.selectedTabId; |
| 190 }, | 190 }, |
| 191 | 191 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 /** | 226 /** |
| 227 * @return {!WebInspector.View} | 227 * @return {!WebInspector.View} |
| 228 */ | 228 */ |
| 229 createView: function() | 229 createView: function() |
| 230 { | 230 { |
| 231 if (!this._instance) | 231 if (!this._instance) |
| 232 this._instance = /** @type {!WebInspector.View} */(new this._constru
ctor()); | 232 this._instance = /** @type {!WebInspector.View} */(new this._constru
ctor()); |
| 233 return this._instance; | 233 return this._instance; |
| 234 } | 234 } |
| 235 } | 235 } |
| OLD | NEW |