Home | History | Annotate | Download | only in toolbox_bootstrap
      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
      3 // found in the LICENSE file.
      4 
      5 function windowLoaded()
      6 {
      7     window.removeEventListener("DOMContentLoaded", windowLoaded, false);
      8     new WebInspector.Toolbox();
      9 }
     10 window.addEventListener("DOMContentLoaded", windowLoaded, false);
     11 
     12 /**
     13  * @constructor
     14  */
     15 WebInspector.Toolbox = function()
     16 {
     17     if (!window.opener || !Runtime.queryParam("toolbox"))
     18         return;
     19 
     20     WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.InspectorFrontendHost);
     21     WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport;
     22     WebInspector.settings = window.opener.WebInspector.settings;
     23     WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSettings;
     24     WebInspector.targetManager = window.opener.WebInspector.targetManager;
     25     WebInspector.workspace = window.opener.WebInspector.workspace;
     26     WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBinding;
     27     WebInspector.Revealer = window.opener.WebInspector.Revealer;
     28     WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu;
     29     WebInspector.installPortStyles();
     30 
     31     var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.WebInspector["app"]);
     32     var rootView = new WebInspector.RootView();
     33     var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
     34     this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspectedPagePlaceholder);
     35     this._responsiveDesignView.show(rootView.element);
     36     rootView.attachToBody();
     37     delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder);
     38 }
     39 
     40 // FIXME: This stub is invoked from the backend and should be removed
     41 // once we migrate to the "pull" model for extensions retrieval.
     42 WebInspector.addExtensions = function() {}
     43