1<!DOCTYPE html> 2<!-- 3Copyright (c) 2013 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7 8<link rel="import" href="/tracing/model/event_set.html"> 9<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> 10<link rel="import" href="/tracing/ui/analysis/analysis_link.html"> 11<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html"> 12 13<polymer-element name="tr-ui-a-single-flow-event-sub-view" 14 extends="tr-ui-a-single-event-sub-view"> 15 <script> 16 'use strict'; 17 18 Polymer({ 19 getEventRows_: function(event) { 20 // TODO(nduca): Figure out if there is a cleaner way to do this. 21 var rows = this.__proto__.__proto__.getEventRows_(event); 22 23 // Put the ID up top. 24 rows.splice(0, 0, { 25 name: 'ID', 26 value: event.id 27 }); 28 29 function createLinkTo(slice) { 30 var linkEl = document.createElement('tr-ui-a-analysis-link'); 31 linkEl.setSelectionAndContent(function() { 32 return new tr.model.EventSet(slice); 33 }); 34 linkEl.textContent = slice.userFriendlyName; 35 return linkEl; 36 } 37 38 rows.push({ 39 name: 'From', 40 value: createLinkTo(event.startSlice) 41 }); 42 rows.push({ 43 name: 'To', 44 value: createLinkTo(event.endSlice) 45 }); 46 return rows; 47 } 48 }); 49 </script> 50</polymer-element> 51