summaryrefslogtreecommitdiff
path: root/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view.html
blob: 9701827e709d3bebca57f11e354e5228d9933cbf (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
<!DOCTYPE html>
<!--
Copyright (c) 2013 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/ui/analysis/analysis_sub_view.html">
<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">

<dom-module id='tr-ui-a-multi-instant-event-sub-view'>
  <template>
    <style>
    :host {
      display: block;
    }
    </style>
    <div id='content'></div>
  </template>
</dom-module>
<script>
'use strict';

Polymer({
  is: 'tr-ui-a-multi-instant-event-sub-view',
  behaviors: [tr.ui.analysis.AnalysisSubView],

  created: function() {
    this.currentSelection_ = undefined;
  },

  set selection(selection) {
    Polymer.dom(this.$.content).textContent = '';
    var realView = document.createElement('tr-ui-a-multi-event-sub-view');
    realView.eventsHaveDuration = false;
    realView.eventsHaveSubRows = false;

    Polymer.dom(this.$.content).appendChild(realView);
    realView.setSelectionWithoutErrorChecks(selection);

    this.currentSelection_ = selection;
  },

  get selection() {
    return this.currentSelection_;
  }
});
</script>