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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 InspectorBackend.setConnection(connection); | 260 InspectorBackend.setConnection(connection); |
261 | 261 |
262 // Install styles and themes | 262 // Install styles and themes |
263 WebInspector.installPortStyles(); | 263 WebInspector.installPortStyles(); |
264 | 264 |
265 if (WebInspector.queryParam("toolbarColor") && WebInspector.queryParam("
textColor")) | 265 if (WebInspector.queryParam("toolbarColor") && WebInspector.queryParam("
textColor")) |
266 WebInspector.setToolbarColors(WebInspector.queryParam("toolbarColor"
), WebInspector.queryParam("textColor")); | 266 WebInspector.setToolbarColors(WebInspector.queryParam("toolbarColor"
), WebInspector.queryParam("textColor")); |
267 | 267 |
268 WebInspector.targetManager = new WebInspector.TargetManager(); | 268 WebInspector.targetManager = new WebInspector.TargetManager(); |
269 WebInspector.targetManager.createTarget(connection, this._doLoadedDoneWi
thCapabilities.bind(this)); | 269 WebInspector.targetManager.createTarget(WebInspector.UIString("Main"), c
onnection, this._doLoadedDoneWithCapabilities.bind(this)); |
270 WebInspector.isolatedFileSystemManager = new WebInspector.IsolatedFileSy
stemManager(); | 270 WebInspector.isolatedFileSystemManager = new WebInspector.IsolatedFileSy
stemManager(); |
271 WebInspector.isolatedFileSystemDispatcher = new WebInspector.IsolatedFil
eSystemDispatcher(WebInspector.isolatedFileSystemManager); | 271 WebInspector.isolatedFileSystemDispatcher = new WebInspector.IsolatedFil
eSystemDispatcher(WebInspector.isolatedFileSystemManager); |
272 WebInspector.workspace = new WebInspector.Workspace(WebInspector.isolate
dFileSystemManager.mapping()); | 272 WebInspector.workspace = new WebInspector.Workspace(WebInspector.isolate
dFileSystemManager.mapping()); |
273 WebInspector.networkWorkspaceBinding = new WebInspector.NetworkWorkspace
Binding(WebInspector.workspace); | 273 WebInspector.networkWorkspaceBinding = new WebInspector.NetworkWorkspace
Binding(WebInspector.workspace); |
274 new WebInspector.NetworkUISourceCodeProvider(WebInspector.networkWorkspa
ceBinding, WebInspector.workspace); | 274 new WebInspector.NetworkUISourceCodeProvider(WebInspector.networkWorkspa
ceBinding, WebInspector.workspace); |
275 new WebInspector.PresentationConsoleMessageHelper(WebInspector.workspace
); | 275 new WebInspector.PresentationConsoleMessageHelper(WebInspector.workspace
); |
276 WebInspector.fileSystemWorkspaceBinding = new WebInspector.FileSystemWor
kspaceBinding(WebInspector.isolatedFileSystemManager, WebInspector.workspace); | 276 WebInspector.fileSystemWorkspaceBinding = new WebInspector.FileSystemWor
kspaceBinding(WebInspector.isolatedFileSystemManager, WebInspector.workspace); |
277 WebInspector.breakpointManager = new WebInspector.BreakpointManager(WebI
nspector.settings.breakpoints, WebInspector.workspace, WebInspector.targetManage
r); | 277 WebInspector.breakpointManager = new WebInspector.BreakpointManager(WebI
nspector.settings.breakpoints, WebInspector.workspace, WebInspector.targetManage
r); |
278 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(We
bInspector.workspace); | 278 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(We
bInspector.workspace); |
279 this._executionContextSelector = new WebInspector.ExecutionContextSelect
or(); | 279 WebInspector.executionContextSelector = new WebInspector.ExecutionContex
tSelector(); |
280 }, | 280 }, |
281 | 281 |
282 _doLoadedDoneWithCapabilities: function(mainTarget) | 282 _doLoadedDoneWithCapabilities: function(mainTarget) |
283 { | 283 { |
284 WebInspector.dockController = new WebInspector.DockController(!!WebInspe
ctor.queryParam("can_dock")); | 284 WebInspector.dockController = new WebInspector.DockController(!!WebInspe
ctor.queryParam("can_dock")); |
285 | 285 |
286 if (mainTarget.canScreencast) | 286 if (mainTarget.canScreencast) |
287 WebInspector.app = new WebInspector.ScreencastApp(); | 287 WebInspector.app = new WebInspector.ScreencastApp(); |
288 else if (WebInspector.dockController.canDock()) | 288 else if (WebInspector.dockController.canDock()) |
289 WebInspector.app = new WebInspector.AdvancedApp(); | 289 WebInspector.app = new WebInspector.AdvancedApp(); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 /** | 799 /** |
800 * @param {string} ws | 800 * @param {string} ws |
801 */ | 801 */ |
802 WebInspector.Main._addWebSocketTarget = function(ws) | 802 WebInspector.Main._addWebSocketTarget = function(ws) |
803 { | 803 { |
804 /** | 804 /** |
805 * @param {!InspectorBackendClass.Connection} connection | 805 * @param {!InspectorBackendClass.Connection} connection |
806 */ | 806 */ |
807 function callback(connection) | 807 function callback(connection) |
808 { | 808 { |
809 WebInspector.targetManager.createTarget(connection); | 809 WebInspector.targetManager.createTarget(ws, connection); |
810 } | 810 } |
811 new InspectorBackendClass.WebSocketConnection(ws, callback); | 811 new InspectorBackendClass.WebSocketConnection(ws, callback); |
812 } | 812 } |
813 | 813 |
814 new WebInspector.Main(); | 814 new WebInspector.Main(); |
815 | 815 |
816 // These methods are added for backwards compatibility with Devtools CodeSchool
extension. | 816 // These methods are added for backwards compatibility with Devtools CodeSchool
extension. |
817 // DO NOT REMOVE | 817 // DO NOT REMOVE |
818 | 818 |
819 WebInspector.__defineGetter__("inspectedPageURL", function() | 819 WebInspector.__defineGetter__("inspectedPageURL", function() |
820 { | 820 { |
821 return WebInspector.resourceTreeModel.inspectedPageURL(); | 821 return WebInspector.resourceTreeModel.inspectedPageURL(); |
822 }); | 822 }); |
823 | 823 |
824 WebInspector.panel = function(name) | 824 WebInspector.panel = function(name) |
825 { | 825 { |
826 return WebInspector.inspectorView.panel(name); | 826 return WebInspector.inspectorView.panel(name); |
827 } | 827 } |
OLD | NEW |