blob: 3fe807e1cb6eef1d0d5e91d58f05b609825eba16 [file] [log] [blame]
<!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="/ui/analysis/analysis_sub_view.html">
<link rel="import" href="/ui/analysis/alert_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) {
if (selection.length != 1)
throw new Error('Only supports single frame!');
this.currentSelection_ = selection;
this.$.asv.selection = selection[0].associatedAlerts;
},
get relatedEventsToHighlight() {
if (!this.currentSelection_)
return undefined;
return this.currentSelection_[0].associatedEvents;
}
});
</script>
</polymer-element>