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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineTracingView.js

Issue 397313003: DevTools: Remove target function from TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @implements {WebInspector.TimelineModeView} 9 * @implements {WebInspector.TimelineModeView}
10 * @implements {WebInspector.FlameChartDelegate} 10 * @implements {WebInspector.FlameChartDelegate}
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 */ 128 */
129 function appendPreviewAndShowDetails(node) 129 function appendPreviewAndShowDetails(node)
130 { 130 {
131 if (node) 131 if (node)
132 contentHelper.appendElementRow("Preview", node); 132 contentHelper.appendElementRow("Preview", node);
133 this._delegate.showInDetails(WebInspector.UIString("Selected Event") , contentHelper.element); 133 this._delegate.showInDetails(WebInspector.UIString("Selected Event") , contentHelper.element);
134 } 134 }
135 var recordTypes = WebInspector.TracingTimelineModel.RecordType; 135 var recordTypes = WebInspector.TracingTimelineModel.RecordType;
136 switch (record.name) { 136 switch (record.name) {
137 case recordTypes.PictureSnapshot: 137 case recordTypes.PictureSnapshot:
138 WebInspector.TracingTimelineUIUtils.buildPicturePreviewContent(this. _tracingModel.target(), record.args["snapshot"]["skp64"], appendPreviewAndShowDe tails.bind(this)); 138 var target = record.thread.target();
139 if (target)
caseq 2014/07/17 16:36:44 We still need to show some details when the target
sergeyv 2014/07/17 17:07:07 Done.
140 WebInspector.TracingTimelineUIUtils.buildPicturePreviewContent(t arget, record.args["snapshot"]["skp64"], appendPreviewAndShowDetails.bind(this)) ;
139 break; 141 break;
140 case recordTypes.LayerTreeHostImplSnapshot: 142 case recordTypes.LayerTreeHostImplSnapshot:
141 var link = document.createElement("span"); 143 var link = document.createElement("span");
142 link.classList.add("revealable-link"); 144 link.classList.add("revealable-link");
143 link.textContent = "show"; 145 link.textContent = "show";
144 link.addEventListener("click", reveal, false); 146 link.addEventListener("click", reveal, false);
145 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"), link); 147 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"), link);
146 // Fall-through intended. 148 // Fall-through intended.
147 default: 149 default:
148 this._delegate.showInDetails(WebInspector.UIString("Selected Event") , contentHelper.element); 150 this._delegate.showInDetails(WebInspector.UIString("Selected Event") , contentHelper.element);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 /** 547 /**
546 * @param {string} string 548 * @param {string} string
547 * @return {string} 549 * @return {string}
548 */ 550 */
549 colorForString: function(string) 551 colorForString: function(string)
550 { 552 {
551 var hash = WebInspector.TraceViewPalette._stringHash(string); 553 var hash = WebInspector.TraceViewPalette._stringHash(string);
552 return this._palette[hash % this._palette.length]; 554 return this._palette[hash % this._palette.length];
553 } 555 }
554 }; 556 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698