| 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.SidebarPane} | 7 * @extends {WebInspector.SidebarPane} |
| 8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 */ | 9 */ |
| 10 WebInspector.ThreadsSidebarPane = function() | 10 WebInspector.ThreadsSidebarPane = function() |
| 11 { | 11 { |
| 12 WebInspector.SidebarPane.call(this, WebInspector.UIString("Threads")); | 12 WebInspector.SidebarPane.call(this, WebInspector.UIString("Threads")); |
| 13 this.setVisible(false); | 13 this.setVisible(false); |
| 14 | 14 |
| 15 /** @type {!Map.<!WebInspector.DebuggerModel, !WebInspector.UIList.Item>} */ | 15 /** @type {!Map.<!WebInspector.DebuggerModel, !WebInspector.UIList.Item>} */ |
| 16 this._debuggerModelToListItems = new Map(); | 16 this._debuggerModelToListItems = new Map(); |
| 17 /** @type {!Map.<!WebInspector.UIList.Item, !WebInspector.Target>} */ | 17 /** @type {!Map.<!WebInspector.UIList.Item, !WebInspector.Target>} */ |
| 18 this._listItemsToTargets = new Map(); | 18 this._listItemsToTargets = new Map(); |
| 19 /** @type {?WebInspector.UIList.Item} */ | 19 /** @type {?WebInspector.UIList.Item} */ |
| 20 this._selectedListItem = null; | 20 this._selectedListItem = null; |
| 21 this.threadList = new WebInspector.UIList(); | 21 this.threadList = new WebInspector.UIList(); |
| 22 this.threadList.show(this.bodyElement); | 22 this.threadList.show(this.element); |
| 23 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._onDebuggerStateChanged, this
); | 23 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerPaused, this._onDebuggerStateChanged, this
); |
| 24 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._onDebuggerStateChanged, thi
s); | 24 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.DebuggerResumed, this._onDebuggerStateChanged, thi
s); |
| 25 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ
etChanged, this); | 25 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targ
etChanged, this); |
| 26 WebInspector.targetManager.observeTargets(this); | 26 WebInspector.targetManager.observeTargets(this); |
| 27 } | 27 } |
| 28 | 28 |
| 29 WebInspector.ThreadsSidebarPane.prototype = { | 29 WebInspector.ThreadsSidebarPane.prototype = { |
| 30 /** | 30 /** |
| 31 * @override | 31 * @override |
| 32 * @param {!WebInspector.Target} target | 32 * @param {!WebInspector.Target} target |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 */ | 125 */ |
| 126 _onListItemClick: function(listItem) | 126 _onListItemClick: function(listItem) |
| 127 { | 127 { |
| 128 WebInspector.context.setFlavor(WebInspector.Target, this._listItemsToTar
gets.get(listItem)); | 128 WebInspector.context.setFlavor(WebInspector.Target, this._listItemsToTar
gets.get(listItem)); |
| 129 listItem.element.scrollIntoViewIfNeeded(); | 129 listItem.element.scrollIntoViewIfNeeded(); |
| 130 }, | 130 }, |
| 131 | 131 |
| 132 | 132 |
| 133 __proto__: WebInspector.SidebarPane.prototype | 133 __proto__: WebInspector.SidebarPane.prototype |
| 134 } | 134 } |
| OLD | NEW |