| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * @param {string} dockSide | 118 * @param {string} dockSide |
| 119 */ | 119 */ |
| 120 _dockSideChanged: function(dockSide) | 120 _dockSideChanged: function(dockSide) |
| 121 { | 121 { |
| 122 if (this._dockSide === dockSide) | 122 if (this._dockSide === dockSide) |
| 123 return; | 123 return; |
| 124 | 124 |
| 125 this.dispatchEventToListeners(WebInspector.DockController.Events.BeforeD
ockSideChanged, dockSide); | 125 this.dispatchEventToListeners(WebInspector.DockController.Events.BeforeD
ockSideChanged, dockSide); |
| 126 InspectorFrontendHost.setIsDocked(dockSide !== WebInspector.DockControll
er.State.Undocked, this._setIsDockedResponse.bind(this)); | 126 var oldDockSide = this._dockSide; |
| 127 InspectorFrontendHost.setIsDocked(dockSide !== WebInspector.DockControll
er.State.Undocked, this._setIsDockedResponse.bind(this, oldDockSide)); |
| 127 this._dockSide = dockSide; | 128 this._dockSide = dockSide; |
| 128 this._updateUI(); | 129 this._updateUI(); |
| 129 this.dispatchEventToListeners(WebInspector.DockController.Events.DockSid
eChanged, this._dockSide); | 130 this.dispatchEventToListeners(WebInspector.DockController.Events.DockSid
eChanged, oldDockSide); |
| 130 }, | 131 }, |
| 131 | 132 |
| 132 _setIsDockedResponse: function() | 133 /** |
| 134 * @param {string} oldDockSide |
| 135 */ |
| 136 _setIsDockedResponse: function(oldDockSide) |
| 133 { | 137 { |
| 134 this.dispatchEventToListeners(WebInspector.DockController.Events.AfterDo
ckSideChanged, this._dockSide); | 138 this.dispatchEventToListeners(WebInspector.DockController.Events.AfterDo
ckSideChanged, oldDockSide); |
| 135 }, | 139 }, |
| 136 | 140 |
| 137 _updateUI: function() | 141 _updateUI: function() |
| 138 { | 142 { |
| 139 var body = document.body; | 143 var body = document.body; |
| 140 switch (this._dockSide) { | 144 switch (this._dockSide) { |
| 141 case WebInspector.DockController.State.DockedToBottom: | 145 case WebInspector.DockController.State.DockedToBottom: |
| 142 body.classList.remove("undocked"); | 146 body.classList.remove("undocked"); |
| 143 body.classList.remove("dock-to-right"); | 147 body.classList.remove("dock-to-right"); |
| 144 body.classList.remove("dock-to-left"); | 148 body.classList.remove("dock-to-left"); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 165 } | 169 } |
| 166 }, | 170 }, |
| 167 | 171 |
| 168 __proto__: WebInspector.Object.prototype | 172 __proto__: WebInspector.Object.prototype |
| 169 } | 173 } |
| 170 | 174 |
| 171 /** | 175 /** |
| 172 * @type {!WebInspector.DockController} | 176 * @type {!WebInspector.DockController} |
| 173 */ | 177 */ |
| 174 WebInspector.dockController; | 178 WebInspector.dockController; |
| OLD | NEW |