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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /**
6 * @constructor
7 * @suppressGlobalPropertiesCheck
8 */
9 WebInspector.Toolbox = function()
10 {
11 if (!window.opener)
12 return;
13
14 var host = /** @type {!WebInspector.ToolboxHost} */ (window.opener.WebInspec tor["app"]);
15 host.toolboxLoaded(document);
16 }
17
5 // FIXME: This stub is invoked from the backend and should be removed 18 // FIXME: This stub is invoked from the backend and should be removed
6 // once we migrate to the "pull" model for extensions retrieval. 19 // once we migrate to the "pull" model for extensions retrieval.
7 WebInspector = {}; 20 WebInspector.addExtensions = function() {}
8 WebInspector.addExtensions = function() {};
9
10 (function()
11 {
12 21
13 /** 22 /**
14 * @suppressGlobalPropertiesCheck 23 * @suppressGlobalPropertiesCheck
15 */
16 function toolboxLoaded()
17 {
18 if (!window.opener)
19 return;
20 window.opener.WebInspector["app"]["toolboxLoaded"](document);
21 }
22
23 /**
24 * @suppressGlobalPropertiesCheck
25 */ 24 */
26 function windowLoaded() 25 function windowLoaded()
27 { 26 {
28 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 27 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
29 toolboxLoaded(); 28 new WebInspector.Toolbox();
30 } 29 }
31 30
32 /** 31 /**
33 * @suppressGlobalPropertiesCheck 32 * @suppressGlobalPropertiesCheck
34 */ 33 */
35 function initToolbox() 34 function initToolbox()
36 { 35 {
37 if (document.readyState === "complete") 36 if (document.readyState === "complete")
38 toolboxLoaded(); 37 new WebInspector.Toolbox();
39 else 38 else
40 window.addEventListener("DOMContentLoaded", windowLoaded, false); 39 window.addEventListener("DOMContentLoaded", windowLoaded, false);
41 } 40 }
42 initToolbox(); 41 initToolbox();
43
44 })();
OLDNEW
« 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