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

Side by Side Diff: Source/devtools/front_end/main/AdvancedApp.js

Issue 615893004: DevTools: Use "toolbox.html" in URL passed to window.open() as a toolbox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox_bootstrap/Toolbox.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox_bootstrap/Toolbox.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698