blob: 9a62241b2d23df91c06c7050497ea7df6d46e805 [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="/core/analysis/multi_event_sub_view.html">
<link rel="import" href="/core/analysis/analysis_sub_view.html">
<link rel="import" href="/base/units/util.html">
<polymer-element name="tr-c-a-multi-frame-sub-view"
extends="tr-c-a-sub-view">
<script>
'use strict';
Polymer({
created: function() {
this.currentSelection_ = undefined;
},
set selection(selection) {
this.textContent = '';
var realView = document.createElement('tr-c-a-multi-event-sub-view');
realView.eventsHaveDuration = false;
realView.eventsHaveSubRows = false;
this.appendChild(realView);
realView.setSelectionWithoutErrorChecks(selection);
this.currentSelection_ = selection;
},
get selection() {
return this.currentSelection_;
},
get relatedEventsToHighlight() {
if (!this.currentSelection_)
return undefined;
var selection = new tr.c.Selection();
this.currentSelection_.forEach(function(frameEvent) {
frameEvent.associatedEvents.forEach(function(event) {
selection.push(event);
});
});
return selection;
}
});
</script>
</polymer-element>