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

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

Issue 692343002: Revert of [DevTools] Extract platform module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 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();
-
-})();
« no previous file with comments | « Source/devtools/front_end/toolbox/module.json ('k') | Source/devtools/front_end/toolbox_bootstrap/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698