OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @implements {InspectorAgent.Dispatcher} | 33 * @implements {InspectorAgent.Dispatcher} |
34 * @implements {WebInspector.Console.UIDelegate} | 34 * @implements {WebInspector.Console.UIDelegate} |
35 * @suppressGlobalPropertiesCheck | 35 * @suppressGlobalPropertiesCheck |
36 */ | 36 */ |
37 WebInspector.Main = function() | 37 WebInspector.Main = function() |
38 { | 38 { |
39 if (!InspectorAppHost) { | |
40 console.error("Inspector should be embedded."); | |
41 return; | |
42 } | |
43 InspectorAppHost.beforeInspectorAppLoad(); | |
44 WebInspector.console.setUIDelegate(this); | 39 WebInspector.console.setUIDelegate(this); |
45 runOnWindowLoad(this._loaded.bind(this)); | 40 runOnWindowLoad(this._loaded.bind(this)); |
46 } | 41 } |
47 | 42 |
48 WebInspector.Main.prototype = { | 43 WebInspector.Main.prototype = { |
49 /** | 44 /** |
50 * @return {!Promise.<undefined>} | 45 * @return {!Promise.<undefined>} |
51 */ | 46 */ |
52 showConsole: function() | 47 showConsole: function() |
53 { | 48 { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 244 |
250 // It is important to kick controller lifetime after apps are instantiat
ed. | 245 // It is important to kick controller lifetime after apps are instantiat
ed. |
251 WebInspector.dockController.initialize(); | 246 WebInspector.dockController.initialize(); |
252 console.timeStamp("Main._presentUI"); | 247 console.timeStamp("Main._presentUI"); |
253 WebInspector.app.presentUI(document); | 248 WebInspector.app.presentUI(document); |
254 | 249 |
255 if (!WebInspector.isWorkerFrontend()) | 250 if (!WebInspector.isWorkerFrontend()) |
256 WebInspector.inspectElementModeController = new WebInspector.Inspect
ElementModeController(); | 251 WebInspector.inspectElementModeController = new WebInspector.Inspect
ElementModeController(); |
257 this._createGlobalStatusBarItems(); | 252 this._createGlobalStatusBarItems(); |
258 | 253 |
259 InspectorAppHost.afterInspectorAppLoad(); | |
260 InspectorFrontendHost.loadCompleted(); | 254 InspectorFrontendHost.loadCompleted(); |
261 | 255 |
262 // Give UI cycles to repaint, then proceed with creating connection. | 256 // Give UI cycles to repaint, then proceed with creating connection. |
263 setTimeout(this._createConnection.bind(this), 0); | 257 setTimeout(this._createConnection.bind(this), 0); |
264 }, | 258 }, |
265 | 259 |
266 _createConnection: function() | 260 _createConnection: function() |
267 { | 261 { |
268 console.timeStamp("Main._createConnection"); | 262 console.timeStamp("Main._createConnection"); |
269 InspectorBackend.loadFromJSONIfNeeded("../protocol.json"); | 263 InspectorBackend.loadFromJSONIfNeeded("../protocol.json"); |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 p.classList.add("help-section"); | 909 p.classList.add("help-section"); |
916 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); | 910 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); |
917 } | 911 } |
918 | 912 |
919 WebInspector.WorkerTerminatedScreen.prototype = { | 913 WebInspector.WorkerTerminatedScreen.prototype = { |
920 | 914 |
921 __proto__: WebInspector.HelpScreen.prototype | 915 __proto__: WebInspector.HelpScreen.prototype |
922 } | 916 } |
923 | 917 |
924 new WebInspector.Main(); | 918 new WebInspector.Main(); |
OLD | NEW |