OLD | NEW |
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 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.ThreadsSidebarPane = function() | 10 WebInspector.ThreadsSidebarPane = function() |
11 { | 11 { |
12 WebInspector.VBox.call(this); | 12 WebInspector.VBox.call(this); |
13 | 13 |
14 /** @type {!Map.<!WebInspector.DebuggerModel, !WebInspector.UIList.Item>} */ | 14 /** @type {!Map.<!WebInspector.DebuggerModel, !WebInspector.UIList.Item>} */ |
15 this._debuggerModelToListItems = new Map(); | 15 this._debuggerModelToListItems = new Map(); |
16 /** @type {!Map.<!WebInspector.UIList.Item, !WebInspector.Target>} */ | 16 /** @type {!Map.<!WebInspector.UIList.Item, !WebInspector.Target>} */ |
17 this._listItemsToTargets = new Map(); | 17 this._listItemsToTargets = new Map(); |
18 /** @type {?WebInspector.UIList.Item} */ | 18 /** @type {?WebInspector.UIList.Item} */ |
19 this._selectedListItem = null; | 19 this._selectedListItem = null; |
20 this.threadList = new WebInspector.UIList(); | 20 this.threadList = new WebInspector.UIList(); |
21 this.threadList.show(this.element); | 21 this.threadList.show(this.element); |
22 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._onDebuggerStateChanged, this
); | 22 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._onDebuggerStateChanged, this
); |
23 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._onDebuggerStateChanged, thi
s); | 23 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._onDebuggerStateChanged, thi
s); |
24 WebInspector.targetManager.addModelListener(WebInspector.RuntimeModel, WebIn
spector.RuntimeModel.Events.ExecutionContextChanged, this._onExecutionContextCha
nged, this); | 24 WebInspector.targetManager.addModelListener(WebInspector.RuntimeModel, WebIn
spector.RuntimeModel.Events.ExecutionContextChanged, this._onExecutionContextCha
nged, this); |
25 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ
etChanged, this); | 25 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ
etChanged, this); |
26 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.NameChanged, this._targetNameChanged, this); | 26 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.NameChanged, this._targetNameChanged, this); |
27 WebInspector.targetManager.observeTargets(this); | 27 WebInspector.targetManager.observeTargets(this); |
28 } | 28 }; |
29 | 29 |
30 WebInspector.ThreadsSidebarPane.prototype = { | 30 WebInspector.ThreadsSidebarPane.prototype = { |
31 /** | 31 /** |
32 * @override | 32 * @override |
33 * @param {!WebInspector.Target} target | 33 * @param {!WebInspector.Target} target |
34 */ | 34 */ |
35 targetAdded: function(target) | 35 targetAdded: function(target) |
36 { | 36 { |
37 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 37 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
38 if (!debuggerModel) | 38 if (!debuggerModel) |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 * @param {!WebInspector.UIList.Item} listItem | 160 * @param {!WebInspector.UIList.Item} listItem |
161 */ | 161 */ |
162 _onListItemClick: function(listItem) | 162 _onListItemClick: function(listItem) |
163 { | 163 { |
164 WebInspector.context.setFlavor(WebInspector.Target, this._listItemsToTar
gets.get(listItem)); | 164 WebInspector.context.setFlavor(WebInspector.Target, this._listItemsToTar
gets.get(listItem)); |
165 listItem.element.scrollIntoViewIfNeeded(); | 165 listItem.element.scrollIntoViewIfNeeded(); |
166 }, | 166 }, |
167 | 167 |
168 | 168 |
169 __proto__: WebInspector.VBox.prototype | 169 __proto__: WebInspector.VBox.prototype |
170 } | 170 }; |
OLD | NEW |