| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.App} | 7 * @extends {WebInspector.App} |
| 8 * @implements {WebInspector.ToolboxDelegate} | 8 * @implements {WebInspector.ToolboxDelegate} |
| 9 */ | 9 */ |
| 10 WebInspector.AdvancedApp = function() | 10 WebInspector.AdvancedApp = function() |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 * @param {!WebInspector.Event} event | 76 * @param {!WebInspector.Event} event |
| 77 */ | 77 */ |
| 78 _openToolboxWindow: function(event) | 78 _openToolboxWindow: function(event) |
| 79 { | 79 { |
| 80 if (/** @type {string} */ (event.data.to) !== WebInspector.DockControlle
r.State.Undocked) | 80 if (/** @type {string} */ (event.data.to) !== WebInspector.DockControlle
r.State.Undocked) |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 if (this._toolboxWindow) | 83 if (this._toolboxWindow) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 // FIXME: Remove toolbox=true and fix the check in DevToolsWindow::WebCo
ntentsCreated(). | 86 var url = window.location.href.replace("devtools.html", "toolbox.html"); |
| 87 var toolbox = (window.location.search ? "&" : "?") + "toolbox=true"; | |
| 88 var hash = window.location.hash; | |
| 89 var url = window.location.href.replace(hash, "") + toolbox + hash; | |
| 90 url = url.replace("devtools.html", "toolbox.html"); | |
| 91 this._toolboxWindow = window.open(url, undefined); | 87 this._toolboxWindow = window.open(url, undefined); |
| 92 }, | 88 }, |
| 93 | 89 |
| 94 /** | 90 /** |
| 95 * @param {!WebInspector.ResponsiveDesignView} responsiveDesignView | 91 * @param {!WebInspector.ResponsiveDesignView} responsiveDesignView |
| 96 * @param {!WebInspector.InspectedPagePlaceholder} placeholder | 92 * @param {!WebInspector.InspectedPagePlaceholder} placeholder |
| 97 */ | 93 */ |
| 98 toolboxLoaded: function(responsiveDesignView, placeholder) | 94 toolboxLoaded: function(responsiveDesignView, placeholder) |
| 99 { | 95 { |
| 100 this._toolboxResponsiveDesignView = responsiveDesignView; | 96 this._toolboxResponsiveDesignView = responsiveDesignView; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 handleAction: function() | 274 handleAction: function() |
| 279 { | 275 { |
| 280 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) | 276 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) |
| 281 return false; | 277 return false; |
| 282 if (!(WebInspector.app instanceof WebInspector.AdvancedApp)) | 278 if (!(WebInspector.app instanceof WebInspector.AdvancedApp)) |
| 283 return false; | 279 return false; |
| 284 WebInspector.app._toggleEmulationEnabled(); | 280 WebInspector.app._toggleEmulationEnabled(); |
| 285 return true; | 281 return true; |
| 286 } | 282 } |
| 287 } | 283 } |
| OLD | NEW |