1<!DOCTYPE html>
2<!--
3Copyright 2014 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<link rel="import" href="/tvcm/ui.html">
8<script>
9'use strict';
10
11tvcm.exportTo('telemetry.web_components', function() {
12  /**
13   * @constructor
14   */
15  var ResultsViewer = tvcm.ui.define('x-results-viewer');
16
17  ResultsViewer.prototype = {
18    __proto__: HTMLUnknownElement.prototype,
19
20    decorate: function() {
21      this.dataToView_ = undefined;
22    },
23
24    get dataToView() {
25      return dataToView_;
26    },
27
28    set dataToView(dataToView) {
29      this.dataToView_ = dataToView;
30      this.updateContents_();
31    },
32
33    updateContents_: function() {
34      this.textContent = JSON.stringify(this.dataToView_);
35    }
36  };
37
38  return {
39    ResultsViewer: ResultsViewer
40  };
41});
42</script>
43