1<!DOCTYPE html>
2<!--
3Copyright 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="/tracing/ui/analysis/analysis_sub_view.html">
9<link rel="import" href="/tracing/ui/analysis/power_sample_table.html">
10
11<polymer-element name="tr-ui-a-single-power-sample-sub-view"
12    extends="tr-ui-a-sub-view">
13  <template>
14    <style>
15    :host { display: block; }
16    </style>
17    <tr-ui-a-power-sample-table id="samplesTable">
18    </tr-ui-a-power-sample-table>
19  </template>
20
21  <script>
22  'use strict';
23
24  Polymer({
25    ready: function() {
26      this.currentSelection_ = undefined;
27    },
28
29    get selection() {
30      return this.currentSelection_;
31    },
32
33    set selection(selection) {
34      this.currentSelection_ = selection;
35      this.updateContents_();
36    },
37
38    updateContents_: function() {
39      this.$.samplesTable.samples = this.selection;
40    }
41  });
42  </script>
43</polymer-element>
44