OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> | 8 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> | 9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> |
10 <link rel="import" href="/tracing/ui/analysis/related_events.html"> | 10 <link rel="import" href="/tracing/ui/analysis/related_events.html"> |
(...skipping 15 matching lines...) Expand all Loading... |
26 <div id="events"> | 26 <div id="events"> |
27 <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events> | 27 <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events> |
28 </div> | 28 </div> |
29 </template> | 29 </template> |
30 </dom-module> | 30 </dom-module> |
31 <script> | 31 <script> |
32 'use strict'; | 32 'use strict'; |
33 | 33 |
34 Polymer({ | 34 Polymer({ |
35 is: 'tr-ui-a-single-async-slice-sub-view', | 35 is: 'tr-ui-a-single-async-slice-sub-view', |
36 behaviors: [tr.ui.analysis.behaviors.AnalysisSubView], | 36 behaviors: [tr.ui.analysis.AnalysisSubView], |
37 | 37 |
38 get selection() { | 38 get selection() { |
39 return this.$.content.selection; | 39 return this.$.content.selection; |
40 }, | 40 }, |
41 | 41 |
42 set selection(selection) { | 42 set selection(selection) { |
43 if (selection.length !== 1) | 43 if (selection.length !== 1) |
44 throw new Error('Only supports single slices'); | 44 throw new Error('Only supports single slices'); |
45 this.$.content.setSelectionWithoutErrorChecks(selection); | 45 this.$.content.setSelectionWithoutErrorChecks(selection); |
46 this.$.relatedEvents.setRelatedEvents(selection); | 46 this.$.relatedEvents.setRelatedEvents(selection); |
(...skipping 16 matching lines...) Expand all Loading... |
63 return rows; | 63 return rows; |
64 }, | 64 }, |
65 | 65 |
66 get relatedEventsToHighlight() { | 66 get relatedEventsToHighlight() { |
67 if (!this.currentSelection_) | 67 if (!this.currentSelection_) |
68 return undefined; | 68 return undefined; |
69 return tr.b.getOnlyElement(this.currentSelection_).associatedEvents; | 69 return tr.b.getOnlyElement(this.currentSelection_).associatedEvents; |
70 } | 70 } |
71 }); | 71 }); |
72 </script> | 72 </script> |
OLD | NEW |