Index: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
diff --git a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
index ae010b4cef652e1d6a05bc64259b7e8b2909fabd..66b7dfdf72ec91784df87a2e3aff6a77719e6143 100644 |
--- a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
+++ b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js |
@@ -2,23 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// FIXME: This stub is invoked from the backend and should be removed |
-// once we migrate to the "pull" model for extensions retrieval. |
-WebInspector = {}; |
-WebInspector.addExtensions = function() {}; |
- |
-(function() |
-{ |
- |
/** |
+ * @constructor |
* @suppressGlobalPropertiesCheck |
*/ |
-function toolboxLoaded() |
+WebInspector.Toolbox = function() |
{ |
if (!window.opener) |
return; |
- window.opener.WebInspector["app"]["toolboxLoaded"](document); |
+ |
+ var host = /** @type {!WebInspector.ToolboxHost} */ (window.opener.WebInspector["app"]); |
+ host.toolboxLoaded(document); |
} |
+ |
+// FIXME: This stub is invoked from the backend and should be removed |
+// once we migrate to the "pull" model for extensions retrieval. |
+WebInspector.addExtensions = function() {} |
/** |
* @suppressGlobalPropertiesCheck |
@@ -26,7 +25,7 @@ |
function windowLoaded() |
{ |
window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
- toolboxLoaded(); |
+ new WebInspector.Toolbox(); |
} |
/** |
@@ -35,10 +34,8 @@ |
function initToolbox() |
{ |
if (document.readyState === "complete") |
- toolboxLoaded(); |
+ new WebInspector.Toolbox(); |
else |
window.addEventListener("DOMContentLoaded", windowLoaded, false); |
} |
initToolbox(); |
- |
-})(); |