blob: f58168d1c870f3050d856676ff2335aaddc52eb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tracing/base/iteration_helpers.html">
<link rel="import" href="/tracing/ui/analysis/alert_sub_view.html">
<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
<polymer-element name="tr-ui-a-single-frame-sub-view"
extends="tr-ui-a-sub-view">
<template>
<style>
:host {
display: flex;
flex-direction: column;
}
#asv {
flex: 0 0 auto;
align-self: stretch;
}
</style>
<tr-ui-a-alert-sub-view id="asv">
</tr-ui-a-alert-sub-view>
</template>
<script>
'use strict';
Polymer({
ready: function() {
this.currentSelection_ = undefined;
},
get selection() {
return this.currentSelection_;
},
set selection(selection) {
this.currentSelection_ = selection;
this.$.asv.selection = tr.b.getOnlyElement(selection).associatedAlerts;
},
get relatedEventsToHighlight() {
if (!this.currentSelection_)
return undefined;
return tr.b.getOnlyElement(this.currentSelection_).associatedEvents;
}
});
</script>
</polymer-element>
|