| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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.ElementsPanel.BaseToolbarPaneWidget} | 7 * @extends {WebInspector.ElementsPanel.BaseToolbarPaneWidget} |
| 8 * @param {!WebInspector.ToolbarItem} toolbarItem | 8 * @param {!WebInspector.ToolbarItem} toolbarItem |
| 9 */ | 9 */ |
| 10 WebInspector.ElementStatePaneWidget = function(toolbarItem) | 10 WebInspector.ElementStatePaneWidget = function(toolbarItem) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 { | 82 { |
| 83 this.update(); | 83 this.update(); |
| 84 }, | 84 }, |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * @override | 87 * @override |
| 88 * @param {?WebInspector.DOMNode} newNode | 88 * @param {?WebInspector.DOMNode} newNode |
| 89 */ | 89 */ |
| 90 onNodeChanged: function(newNode) | 90 onNodeChanged: function(newNode) |
| 91 { | 91 { |
| 92 this._updateTarget(newNode? newNode.target() : null); | 92 this._updateTarget(newNode ? newNode.target() : null); |
| 93 this.update(); | 93 this.update(); |
| 94 }, | 94 }, |
| 95 | 95 |
| 96 /** | 96 /** |
| 97 * @override | 97 * @override |
| 98 * @return {!Promise.<?>} | 98 * @return {!Promise.<?>} |
| 99 */ | 99 */ |
| 100 doUpdate: function() | 100 doUpdate: function() |
| 101 { | 101 { |
| 102 var node = WebInspector.context.flavor(WebInspector.DOMNode); | 102 var node = WebInspector.context.flavor(WebInspector.DOMNode); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 }, | 148 }, |
| 149 | 149 |
| 150 _nodeChanged: function() | 150 _nodeChanged: function() |
| 151 { | 151 { |
| 152 var enabled = !!WebInspector.context.flavor(WebInspector.DOMNode); | 152 var enabled = !!WebInspector.context.flavor(WebInspector.DOMNode); |
| 153 this._button.setEnabled(enabled); | 153 this._button.setEnabled(enabled); |
| 154 if (!enabled && this._button.toggled()) | 154 if (!enabled && this._button.toggled()) |
| 155 WebInspector.ElementsPanel.instance().showToolbarPane(null); | 155 WebInspector.ElementsPanel.instance().showToolbarPane(null); |
| 156 } | 156 } |
| 157 } | 157 } |
| OLD | NEW |