Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1395)

Unified Diff: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js

Issue 673163004: [DevTools] Extract platform module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector-protocol tests Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 66b7dfdf72ec91784df87a2e3aff6a77719e6143..ae010b4cef652e1d6a05bc64259b7e8b2909fabd 100644
--- a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
+++ b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
@@ -2,30 +2,31 @@
// 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
*/
-WebInspector.Toolbox = function()
+function toolboxLoaded()
{
if (!window.opener)
return;
-
- var host = /** @type {!WebInspector.ToolboxHost} */ (window.opener.WebInspector["app"]);
- host.toolboxLoaded(document);
+ window.opener.WebInspector["app"]["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
*/
function windowLoaded()
{
window.removeEventListener("DOMContentLoaded", windowLoaded, false);
- new WebInspector.Toolbox();
+ toolboxLoaded();
}
/**
@@ -34,8 +35,10 @@ function windowLoaded()
function initToolbox()
{
if (document.readyState === "complete")
- new WebInspector.Toolbox();
+ toolboxLoaded();
else
window.addEventListener("DOMContentLoaded", windowLoaded, false);
}
initToolbox();
+
+})();

Powered by Google App Engine
This is Rietveld 408576698