blob: c0a4cae3d2ff7ff51a7df117117e31af98e3b6d9 [file] [log] [blame]
Chris Craikb122baf2015-03-05 13:58:42 -08001<!DOCTYPE html>
2<!--
3Copyright (c) 2015 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="/core/analysis/analysis_sub_view.html">
Chris Craikbeca7ae2015-04-07 13:29:55 -07009<link rel="import" href="/core/analysis/single_event_sub_view.html">
Chris Craikb122baf2015-03-05 13:58:42 -080010
11<polymer-element name="tv-c-single-interaction-record-sub-view"
12 extends="tracing-analysis-sub-view">
13 <script>
14 'use strict';
15
16 Polymer({
17 created: function() {
18 this.currentSelection_ = undefined;
19 },
20
21 set selection(selection) {
22 this.textContent = '';
Chris Craikbeca7ae2015-04-07 13:29:55 -070023 var realView = document.createElement('tv-c-a-single-event-sub-view');
Chris Craikb122baf2015-03-05 13:58:42 -080024
25 this.appendChild(realView);
26 realView.setSelectionWithoutErrorChecks(selection);
27
28 this.currentSelection_ = selection;
Chris Craik44c28202015-05-12 17:25:16 -070029 },
30
31 get relatedEventsToHighlight() {
32 if (!this.currentSelection_)
33 return undefined;
34 return new tv.c.Selection(this.currentSelection_[0].associatedEvents);
Chris Craikb122baf2015-03-05 13:58:42 -080035 }
36 });
37 </script>
Chris Craik44c28202015-05-12 17:25:16 -070038</polymer-element>