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