Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 }; |
| OLD | NEW |