Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js

Issue 2358253002: DevTools: extract a component for layer viewer (Closed)
Patch Set: renamed the banner Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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.VBox} 7 * @extends {WebInspector.VBox}
8 * @param {!WebInspector.TimelineModel} model 8 * @param {!WebInspector.TimelineModel} model
9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters 9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters
10 */ 10 */
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 _updateDetailsForSelection: function() 233 _updateDetailsForSelection: function()
234 { 234 {
235 var selectedNode = this._dataGrid.selectedNode ? /** @type {!WebInspecto r.TimelineTreeView.TreeGridNode} */ (this._dataGrid.selectedNode)._profileNode : null; 235 var selectedNode = this._dataGrid.selectedNode ? /** @type {!WebInspecto r.TimelineTreeView.TreeGridNode} */ (this._dataGrid.selectedNode)._profileNode : null;
236 if (selectedNode === this._lastSelectedNode) 236 if (selectedNode === this._lastSelectedNode)
237 return; 237 return;
238 this._lastSelectedNode = selectedNode; 238 this._lastSelectedNode = selectedNode;
239 this._detailsView.detachChildWidgets(); 239 this._detailsView.detachChildWidgets();
240 this._detailsView.element.removeChildren(); 240 this._detailsView.element.removeChildren();
241 if (!selectedNode || !this._showDetailsForNode(selectedNode)) { 241 if (!selectedNode || !this._showDetailsForNode(selectedNode)) {
242 var banner = this._detailsView.element.createChild("div", "banner"); 242 var banner = this._detailsView.element.createChild("div", "full-widg et-dimmed-banner");
243 banner.createTextChild(WebInspector.UIString("Select item for detail s.")); 243 banner.createTextChild(WebInspector.UIString("Select item for detail s."));
244 } 244 }
245 }, 245 },
246 246
247 /** 247 /**
248 * @param {!WebInspector.TimelineProfileTree.Node} node 248 * @param {!WebInspector.TimelineProfileTree.Node} node
249 * @return {boolean} 249 * @return {boolean}
250 */ 250 */
251 _showDetailsForNode: function(node) 251 _showDetailsForNode: function(node)
252 { 252 {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; 879 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode;
880 }, 880 },
881 881
882 _onSelectionChanged: function() 882 _onSelectionChanged: function()
883 { 883 {
884 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); 884 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged);
885 }, 885 },
886 886
887 __proto__: WebInspector.VBox.prototype 887 __proto__: WebInspector.VBox.prototype
888 } 888 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698