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 function windowLoaded() | 5 function windowLoaded() |
6 { | 6 { |
7 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 7 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
8 new WebInspector.Toolbox(); | 8 new WebInspector.Toolbox(); |
9 } | 9 } |
10 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 10 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
11 | 11 |
12 /** | 12 /** |
13 * @constructor | 13 * @constructor |
14 */ | 14 */ |
15 WebInspector.Toolbox = function() | 15 WebInspector.Toolbox = function() |
16 { | 16 { |
17 if (!window.opener || !Runtime.queryParam("toolbox")) | 17 if (!window.opener) |
18 return; | 18 return; |
19 | 19 |
20 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec
torFrontendHost); | 20 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec
torFrontendHost); |
21 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; | 21 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; |
22 WebInspector.settings = window.opener.WebInspector.settings; | 22 WebInspector.settings = window.opener.WebInspector.settings; |
23 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet
tings; | 23 WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSet
tings; |
24 WebInspector.targetManager = window.opener.WebInspector.targetManager; | 24 WebInspector.targetManager = window.opener.WebInspector.targetManager; |
25 WebInspector.workspace = window.opener.WebInspector.workspace; | 25 WebInspector.workspace = window.opener.WebInspector.workspace; |
26 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi
nding; | 26 WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBi
nding; |
27 WebInspector.Revealer = window.opener.WebInspector.Revealer; | 27 WebInspector.Revealer = window.opener.WebInspector.Revealer; |
28 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu; | 28 WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu; |
29 WebInspector.installPortStyles(); | 29 WebInspector.installPortStyles(); |
30 | 30 |
31 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W
ebInspector["app"]); | 31 var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.W
ebInspector["app"]); |
32 var rootView = new WebInspector.RootView(); | 32 var rootView = new WebInspector.RootView(); |
33 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); | 33 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); |
34 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected
PagePlaceholder); | 34 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected
PagePlaceholder); |
35 this._responsiveDesignView.show(rootView.element); | 35 this._responsiveDesignView.show(rootView.element); |
36 rootView.attachToBody(); | 36 rootView.attachToBody(); |
37 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder)
; | 37 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder)
; |
38 } | 38 } |
39 | 39 |
40 // FIXME: This stub is invoked from the backend and should be removed | 40 // FIXME: This stub is invoked from the backend and should be removed |
41 // once we migrate to the "pull" model for extensions retrieval. | 41 // once we migrate to the "pull" model for extensions retrieval. |
42 WebInspector.addExtensions = function() {} | 42 WebInspector.addExtensions = function() {} |
OLD | NEW |