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

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

Issue 671463002: DevTools: make flame chart a web component. (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 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec torFrontendHost); 13 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec torFrontendHost);
14 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; 14 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport;
15 WebInspector.settings = window.opener.WebInspector.settings; 15 WebInspector.settings = window.opener.WebInspector.settings;
16 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet tings; 16 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet tings;
17 WebInspector.targetManager = window.opener.WebInspector.targetManager; 17 WebInspector.targetManager = window.opener.WebInspector.targetManager;
18 WebInspector.workspace = window.opener.WebInspector.workspace; 18 WebInspector.workspace = window.opener.WebInspector.workspace;
19 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi nding; 19 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi nding;
20 WebInspector.Revealer = window.opener.WebInspector.Revealer; 20 WebInspector.Revealer = window.opener.WebInspector.Revealer;
21 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu; 21 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu;
22 WebInspector.ContextMenu.installHandler(document); 22 WebInspector.ContextMenu.installHandler(document);
23 WebInspector.installPortStyles();
24 23
25 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]); 24 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W ebInspector["app"]);
26 var rootView = new WebInspector.RootView(); 25 var rootView = new WebInspector.RootView();
27 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); 26 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
28 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected PagePlaceholder); 27 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected PagePlaceholder);
29 this._responsiveDesignView.show(rootView.element); 28 this._responsiveDesignView.show(rootView.element);
30 rootView.attachToBody(); 29 rootView.attachToBody();
31 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder) ; 30 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder) ;
32 } 31 }
33 32
34 // 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
35 // once we migrate to the "pull" model for extensions retrieval. 34 // once we migrate to the "pull" model for extensions retrieval.
36 WebInspector.addExtensions = function() {} 35 WebInspector.addExtensions = function() {}
37 36
38 function windowLoaded() 37 function windowLoaded()
39 { 38 {
40 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 39 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
41 new WebInspector.Toolbox(); 40 new WebInspector.Toolbox();
42 } 41 }
43 42
44 if (document.readyState === "complete") 43 if (document.readyState === "complete")
45 new WebInspector.Toolbox(); 44 new WebInspector.Toolbox();
46 else 45 else
47 window.addEventListener("DOMContentLoaded", windowLoaded, false); 46 window.addEventListener("DOMContentLoaded", windowLoaded, false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698