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

Side by Side Diff: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js

Issue 660503002: Revert of [DevTools] Inject element into toolbox window, do not load modules there. (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
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 */ 7 */
8 WebInspector.Toolbox = function() 8 WebInspector.Toolbox = function()
9 { 9 {
10 if (!window.opener) 10 if (!window.opener)
11 return; 11 return;
12 12
13 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]); 13 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec torFrontendHost);
14 14 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport;
15 WebInspector.zoomManager = new WebInspector.ZoomManager(delegate.inspectorFr ontendHost()); 15 WebInspector.settings = window.opener.WebInspector.settings;
16 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet tings;
17 WebInspector.targetManager = window.opener.WebInspector.targetManager;
18 WebInspector.workspace = window.opener.WebInspector.workspace;
19 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi nding;
20 WebInspector.Revealer = window.opener.WebInspector.Revealer;
21 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu;
16 WebInspector.installPortStyles(); 22 WebInspector.installPortStyles();
17 23
24 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]);
18 var rootView = new WebInspector.RootView(); 25 var rootView = new WebInspector.RootView();
19 delegate.toolboxLoaded(rootView.element); 26 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
27 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected PagePlaceholder);
28 this._responsiveDesignView.show(rootView.element);
20 rootView.attachToBody(); 29 rootView.attachToBody();
30 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder) ;
21 } 31 }
22 32
23 // FIXME: This stub is invoked from the backend and should be removed 33 // FIXME: This stub is invoked from the backend and should be removed
24 // once we migrate to the "pull" model for extensions retrieval. 34 // once we migrate to the "pull" model for extensions retrieval.
25 WebInspector.addExtensions = function() {} 35 WebInspector.addExtensions = function() {}
26 36
27 function windowLoaded() 37 function windowLoaded()
28 { 38 {
29 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 39 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
30 new WebInspector.Toolbox(); 40 new WebInspector.Toolbox();
31 } 41 }
32 42
33 if (document.readyState === "complete") 43 if (document.readyState === "complete")
34 new WebInspector.Toolbox(); 44 new WebInspector.Toolbox();
35 else 45 else
36 window.addEventListener("DOMContentLoaded", windowLoaded, false); 46 window.addEventListener("DOMContentLoaded", windowLoaded, false);
OLDNEW
« no previous file with comments | « Source/devtools/front_end/toolbox/ToolboxDelegate.js ('k') | Source/devtools/front_end/toolbox_bootstrap/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698