| 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() | |
| 6 { | |
| 7 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | |
| 8 new WebInspector.Toolbox(); | |
| 9 } | |
| 10 window.addEventListener("DOMContentLoaded", windowLoaded, false); | |
| 11 | |
| 12 /** | 5 /** |
| 13 * @constructor | 6 * @constructor |
| 14 */ | 7 */ |
| 15 WebInspector.Toolbox = function() | 8 WebInspector.Toolbox = function() |
| 16 { | 9 { |
| 17 if (!window.opener) | 10 if (!window.opener) |
| 18 return; | 11 return; |
| 19 | 12 |
| 20 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec
torFrontendHost); | 13 WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.Inspec
torFrontendHost); |
| 21 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; | 14 WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); | 26 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); |
| 34 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected
PagePlaceholder); | 27 this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspected
PagePlaceholder); |
| 35 this._responsiveDesignView.show(rootView.element); | 28 this._responsiveDesignView.show(rootView.element); |
| 36 rootView.attachToBody(); | 29 rootView.attachToBody(); |
| 37 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder)
; | 30 delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder)
; |
| 38 } | 31 } |
| 39 | 32 |
| 40 // 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 |
| 41 // once we migrate to the "pull" model for extensions retrieval. | 34 // once we migrate to the "pull" model for extensions retrieval. |
| 42 WebInspector.addExtensions = function() {} | 35 WebInspector.addExtensions = function() {} |
| 36 |
| 37 function windowLoaded() |
| 38 { |
| 39 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
| 40 new WebInspector.Toolbox(); |
| 41 } |
| 42 |
| 43 if (document.readyState === "complete") |
| 44 new WebInspector.Toolbox(); |
| 45 else |
| 46 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
| OLD | NEW |