Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: Source/devtools/front_end/components/DockController.js

Issue 298913004: [DevTools] Add Toolbox page to undocked DevTools frontend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698