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

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

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments 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 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec torFrontendHost); 13 WebInspector.initializeUIUtils(window);
14 WebInspector.zoomManager = new WebInspector.ZoomManager(window, window.opene r.InspectorFrontendHost);
14 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; 15 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport;
15 WebInspector.settings = window.opener.WebInspector.settings; 16 WebInspector.settings = window.opener.WebInspector.settings;
16 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet tings; 17 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet tings;
17 WebInspector.targetManager = window.opener.WebInspector.targetManager; 18 WebInspector.targetManager = window.opener.WebInspector.targetManager;
18 WebInspector.workspace = window.opener.WebInspector.workspace; 19 WebInspector.workspace = window.opener.WebInspector.workspace;
19 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi nding; 20 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi nding;
20 WebInspector.Revealer = window.opener.WebInspector.Revealer; 21 WebInspector.Revealer = window.opener.WebInspector.Revealer;
21 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu; 22 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu;
22 WebInspector.ContextMenu.installHandler(document); 23 WebInspector.ContextMenu.installHandler(document);
23 WebInspector.installPortStyles(); 24 WebInspector.installPortStyles(document);
24 25
25 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]); 26 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]);
26 var rootView = new WebInspector.RootView(); 27 var rootView = new WebInspector.RootView();
27 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); 28 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
28 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected PagePlaceholder); 29 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected PagePlaceholder);
29 this._responsiveDesignView.show(rootView.element); 30 this._responsiveDesignView.show(rootView.element);
30 rootView.attachToBody(); 31 rootView.attachToBody();
31 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder) ; 32 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder) ;
32 } 33 }
33 34
34 // FIXME: This stub is invoked from the backend and should be removed 35 // FIXME: This stub is invoked from the backend and should be removed
35 // once we migrate to the "pull" model for extensions retrieval. 36 // once we migrate to the "pull" model for extensions retrieval.
36 WebInspector.addExtensions = function() {} 37 WebInspector.addExtensions = function() {}
37 38
38 function windowLoaded() 39 function windowLoaded()
39 { 40 {
40 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 41 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
41 new WebInspector.Toolbox(); 42 new WebInspector.Toolbox();
42 } 43 }
43 44
44 if (document.readyState === "complete") 45 if (document.readyState === "complete")
45 new WebInspector.Toolbox(); 46 new WebInspector.Toolbox();
46 else 47 else
47 window.addEventListener("DOMContentLoaded", windowLoaded, false); 48 window.addEventListener("DOMContentLoaded", windowLoaded, false);
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TracingTimelineUIUtils.js ('k') | Source/devtools/front_end/ui/ContextMenu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698