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/ui/analysis/analysis_sub_view.html"> 9<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html"> 10<link rel="import" href="/tracing/ui/analysis/related_events.html"> 11 12<polymer-element name="tr-ui-a-single-thread-slice-sub-view" 13 extends="tr-ui-a-sub-view"> 14 <template> 15 <style> 16 :host { 17 display: flex; 18 flex-direction: row; 19 } 20 #events { 21 display: flex; 22 flex-direction: column; 23 } 24 25 </style> 26 <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view> 27 <div id="events"> 28 <tr-ui-a-related-events id="relatedEvents"> 29 </tr-ui-a-related-events> 30 </div> 31 </template> 32 33 <script> 34 'use strict'; 35 36 Polymer({ 37 get selection() { 38 return this.$.content.selection; 39 }, 40 41 set selection(selection) { 42 this.$.content.selection = selection; 43 this.$.relatedEvents.setRelatedEvents(selection); 44 if (this.$.relatedEvents.hasRelatedEvents()) 45 this.$.relatedEvents.style.display = ''; 46 else 47 this.$.relatedEvents.style.display = 'none'; 48 } 49 }); 50 </script> 51</polymer-element> 52