Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1472)

Side by Side Diff: tools/telemetry/telemetry/components/results_viewer.js

Issue 169283004: Introduce telemetry.web_components and a simple component-based Results object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added HTML output, ready for review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 'use strict';
6
7 tvcm.require('tvcm.ui');
8
9 tvcm.exportTo('telemetry.components', function() {
10 /**
11 * @constructor
12 */
13 var ResultsViewer = tvcm.ui.define('x-results-viewer');
14
15 ResultsViewer.prototype = {
16 __proto__: HTMLUnknownElement.prototype,
17
18 decorate: function() {
19 this.dataToView_ = undefined;
20 },
21
22 get dataToView() {
23 return dataToView_;
24 },
25
26 set dataToView(dataToView) {
27 this.dataToView_ = dataToView;
28 this.updateContents_();
29 },
30
31 updateContents_: function() {
32 this.textContent = JSON.stringify(this.dataToView_);
33 }
34 };
35
36 return {
37 ResultsViewer: ResultsViewer
38 };
39 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698