OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._onCu
rrentTargetChanged, this); | 101 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._onCu
rrentTargetChanged, this); |
102 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerWasEnabled, this._debuggerWasEnabled, this
); | 102 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerWasEnabled, this._debuggerWasEnabled, this
); |
103 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerWasDisabled, this._debuggerReset, this); | 103 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerWasDisabled, this._debuggerReset, this); |
104 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this); | 104 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this); |
105 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this); | 105 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this); |
106 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.CallFrameSelected, this._callFrameSelected, this); | 106 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.CallFrameSelected, this._callFrameSelected, this); |
107 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame, this._
consoleCommandEvaluatedInSelectedCallFrame, this); | 107 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.ConsoleCommandEvaluatedInSelectedCallFrame, this._
consoleCommandEvaluatedInSelectedCallFrame, this); |
108 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this); | 108 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this); |
109 WebInspector.targetManager.observeTargets(this); | 109 WebInspector.targetManager.observeTargets(this); |
110 new WebInspector.WorkspaceMappingTip(this, this._workspace); | 110 new WebInspector.WorkspaceMappingTip(this, this._workspace); |
| 111 WebInspector.extensionServer.addEventListener(WebInspector.ExtensionServer.E
vents.SidebarPaneAdded, this._extensionSidebarPaneAdded, this); |
111 } | 112 } |
112 | 113 |
113 WebInspector.SourcesPanel.minToolbarWidth = 215; | 114 WebInspector.SourcesPanel.minToolbarWidth = 215; |
114 | 115 |
115 WebInspector.SourcesPanel.prototype = { | 116 WebInspector.SourcesPanel.prototype = { |
116 /** | 117 /** |
117 * @param {?WebInspector.Target} target | 118 * @param {?WebInspector.Target} target |
118 */ | 119 */ |
119 _setTarget: function(target) | 120 _setTarget: function(target) |
120 { | 121 { |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 sidebarPaneStack.addPane(this.sidebarPanes.eventListenerBreakpoints)
; | 1063 sidebarPaneStack.addPane(this.sidebarPanes.eventListenerBreakpoints)
; |
1063 | 1064 |
1064 var tabbedPane = new WebInspector.SidebarTabbedPane(); | 1065 var tabbedPane = new WebInspector.SidebarTabbedPane(); |
1065 tabbedPane.show(splitView.sidebarElement()); | 1066 tabbedPane.show(splitView.sidebarElement()); |
1066 tabbedPane.addPane(this.sidebarPanes.scopechain); | 1067 tabbedPane.addPane(this.sidebarPanes.scopechain); |
1067 tabbedPane.addPane(this.sidebarPanes.watchExpressions); | 1068 tabbedPane.addPane(this.sidebarPanes.watchExpressions); |
1068 this._extensionSidebarPanesContainer = tabbedPane; | 1069 this._extensionSidebarPanesContainer = tabbedPane; |
1069 | 1070 |
1070 this.sidebarPaneView = splitView; | 1071 this.sidebarPaneView = splitView; |
1071 } | 1072 } |
1072 for (var i = 0; i < this._extensionSidebarPanes.length; ++i) | 1073 |
1073 this._extensionSidebarPanesContainer.addPane(this._extensionSidebarP
anes[i]); | 1074 var extensionSidebarPanes = WebInspector.extensionServer.sidebarPanes(); |
| 1075 for (var i = 0; i < extensionSidebarPanes.length; ++i) |
| 1076 this._addExtensionSidebarPane(extensionSidebarPanes[i]); |
1074 | 1077 |
1075 this.sidebarPaneView.show(this._splitView.sidebarElement()); | 1078 this.sidebarPaneView.show(this._splitView.sidebarElement()); |
1076 this.sidebarPanes.threads.expand(); | 1079 this.sidebarPanes.threads.expand(); |
1077 this.sidebarPanes.scopechain.expand(); | 1080 this.sidebarPanes.scopechain.expand(); |
1078 this.sidebarPanes.jsBreakpoints.expand(); | 1081 this.sidebarPanes.jsBreakpoints.expand(); |
1079 this.sidebarPanes.callstack.expand(); | 1082 this.sidebarPanes.callstack.expand(); |
1080 this._sidebarPaneStack = sidebarPaneStack; | 1083 this._sidebarPaneStack = sidebarPaneStack; |
1081 this._updateTargetsSidebarVisibility(); | 1084 this._updateTargetsSidebarVisibility(); |
1082 if (WebInspector.settings.watchExpressions.get().length > 0) | 1085 if (WebInspector.settings.watchExpressions.get().length > 0) |
1083 this.sidebarPanes.watchExpressions.expand(); | 1086 this.sidebarPanes.watchExpressions.expand(); |
1084 }, | 1087 }, |
1085 | 1088 |
1086 /** | 1089 /** |
1087 * @param {string} id | 1090 * @param {!WebInspector.Event} event |
1088 * @param {!WebInspector.SidebarPane} pane | |
1089 */ | 1091 */ |
1090 addExtensionSidebarPane: function(id, pane) | 1092 _extensionSidebarPaneAdded: function(event) |
1091 { | 1093 { |
1092 this._extensionSidebarPanes.push(pane); | 1094 var pane = /** @type {!WebInspector.ExtensionSidebarPane} */ (event.data
); |
1093 this._extensionSidebarPanesContainer.addPane(pane); | 1095 this._addExtensionSidebarPane(pane); |
1094 this.setHideOnDetach(); | |
1095 }, | 1096 }, |
1096 | 1097 |
1097 /** | 1098 /** |
| 1099 * @param {!WebInspector.ExtensionSidebarPane} pane |
| 1100 */ |
| 1101 _addExtensionSidebarPane: function(pane) |
| 1102 { |
| 1103 if (pane.panelName() === this.name) { |
| 1104 this.setHideOnDetach(); |
| 1105 this._extensionSidebarPanesContainer.addPane(pane); |
| 1106 } |
| 1107 }, |
| 1108 |
| 1109 /** |
1098 * @return {!WebInspector.SourcesView} | 1110 * @return {!WebInspector.SourcesView} |
1099 */ | 1111 */ |
1100 sourcesView: function() | 1112 sourcesView: function() |
1101 { | 1113 { |
1102 return this._sourcesView; | 1114 return this._sourcesView; |
1103 }, | 1115 }, |
1104 | 1116 |
1105 /** | 1117 /** |
1106 * @param {!WebInspector.Target} target | 1118 * @param {!WebInspector.Target} target |
1107 */ | 1119 */ |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 | 1416 |
1405 WebInspector.SourcesPanelFactory.prototype = { | 1417 WebInspector.SourcesPanelFactory.prototype = { |
1406 /** | 1418 /** |
1407 * @return {!WebInspector.Panel} | 1419 * @return {!WebInspector.Panel} |
1408 */ | 1420 */ |
1409 createPanel: function() | 1421 createPanel: function() |
1410 { | 1422 { |
1411 return WebInspector.SourcesPanel.instance(); | 1423 return WebInspector.SourcesPanel.instance(); |
1412 } | 1424 } |
1413 } | 1425 } |
OLD | NEW |