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

Unified Diff: Source/devtools/front_end/main/Main.js

Issue 710033003: [DevTools] Extract part of DevTools into inspector app. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/platform/DOMExtension.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Main.js
diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js
index 35722bbd078fb2c04bcefb704c2c55c6dfad7bd3..35310c4cda8f460712d4cecb6bfb42e415956e02 100644
--- a/Source/devtools/front_end/main/Main.js
+++ b/Source/devtools/front_end/main/Main.js
@@ -36,23 +36,13 @@
*/
WebInspector.Main = function()
{
- var boundListener = windowLoaded.bind(this);
- WebInspector.console.setUIDelegate(this);
- if (document.readyState === "complete") {
- this._loaded();
+ if (!InspectorAppHost) {
+ console.error("Inspector should be embedded.");
return;
}
-
- /**
- * @suppressGlobalPropertiesCheck
- * @this {WebInspector.Main}
- */
- function windowLoaded()
- {
- this._loaded();
- window.removeEventListener("DOMContentLoaded", boundListener, false);
- }
- window.addEventListener("DOMContentLoaded", boundListener, false);
+ InspectorAppHost.beforeInspectorAppLoad();
+ WebInspector.console.setUIDelegate(this);
+ runOnWindowLoad(this._loaded.bind(this));
}
WebInspector.Main.prototype = {
@@ -266,6 +256,7 @@ WebInspector.Main.prototype = {
WebInspector.inspectElementModeController = new WebInspector.InspectElementModeController();
this._createGlobalStatusBarItems();
+ InspectorAppHost.afterInspectorAppLoad();
InspectorFrontendHost.loadCompleted();
// Give UI cycles to repaint, then proceed with creating connection.
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/platform/DOMExtension.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698