| 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 // FIXME: This stub is invoked from the backend and should be removed |
| 6 // once we migrate to the "pull" model for extensions retrieval. |
| 7 WebInspector = {}; |
| 8 WebInspector.addExtensions = function() {}; |
| 9 |
| 10 (function() |
| 11 { |
| 12 |
| 5 /** | 13 /** |
| 6 * @constructor | |
| 7 * @suppressGlobalPropertiesCheck | 14 * @suppressGlobalPropertiesCheck |
| 8 */ | 15 */ |
| 9 WebInspector.Toolbox = function() | 16 function toolboxLoaded() |
| 10 { | 17 { |
| 11 if (!window.opener) | 18 if (!window.opener) |
| 12 return; | 19 return; |
| 13 | 20 window.opener.WebInspector["app"]["toolboxLoaded"](document); |
| 14 var host = /** @type {!WebInspector.ToolboxHost} */ (window.opener.WebInspec
tor["app"]); | |
| 15 host.toolboxLoaded(document); | |
| 16 } | 21 } |
| 17 | 22 |
| 18 // FIXME: This stub is invoked from the backend and should be removed | |
| 19 // once we migrate to the "pull" model for extensions retrieval. | |
| 20 WebInspector.addExtensions = function() {} | |
| 21 | |
| 22 /** | 23 /** |
| 23 * @suppressGlobalPropertiesCheck | 24 * @suppressGlobalPropertiesCheck |
| 24 */ | 25 */ |
| 25 function windowLoaded() | 26 function windowLoaded() |
| 26 { | 27 { |
| 27 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 28 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
| 28 new WebInspector.Toolbox(); | 29 toolboxLoaded(); |
| 29 } | 30 } |
| 30 | 31 |
| 31 /** | 32 /** |
| 32 * @suppressGlobalPropertiesCheck | 33 * @suppressGlobalPropertiesCheck |
| 33 */ | 34 */ |
| 34 function initToolbox() | 35 function initToolbox() |
| 35 { | 36 { |
| 36 if (document.readyState === "complete") | 37 if (document.readyState === "complete") |
| 37 new WebInspector.Toolbox(); | 38 toolboxLoaded(); |
| 38 else | 39 else |
| 39 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 40 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
| 40 } | 41 } |
| 41 initToolbox(); | 42 initToolbox(); |
| 43 |
| 44 })(); |
| OLD | NEW |