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

Side by Side Diff: tracing/tracing/value/ui/diagnostic_span_behavior.html

Issue 3009553002: Refactor Histogram relationship diagnostics. (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/base.html"> 8 <link rel="import" href="/tracing/base/base.html">
9 9
10 <script> 10 <script>
11 'use strict'; 11 'use strict';
12 tr.exportTo('tr.v.ui', function() { 12 tr.exportTo('tr.v.ui', function() {
13 const DIAGNOSTIC_SPAN_BEHAVIOR = { 13 const DIAGNOSTIC_SPAN_BEHAVIOR = {
14 created() { 14 created() {
15 this.diagnostic_ = undefined; 15 this.diagnostic_ = undefined;
16 this.name_ = undefined; 16 this.name_ = undefined;
17 this.histogram_ = undefined; 17 this.histogram_ = undefined;
18 this.histograms_ = undefined;
18 }, 19 },
19 20
20 attached() { 21 attached() {
21 if (this.diagnostic_) this.updateContents_(); 22 if (this.diagnostic_) this.updateContents_();
22 }, 23 },
23 24
24 get diagnostic() { 25 get diagnostic() {
25 return this.diagnostic_; 26 return this.diagnostic_;
26 }, 27 },
27 28
28 build(diagnostic, name, histogram) { 29 /**
30 * @param {!tr.v.d.Diagnostic} diagnostic
31 * @param {string} name
32 * @param {!tr.v.Histogram} histogram
33 * @param {!tr.v.HistogramSet} histograms
34 */
35 build(diagnostic, name, histogram, histograms) {
29 this.diagnostic_ = diagnostic; 36 this.diagnostic_ = diagnostic;
30 this.name_ = name; 37 this.name_ = name;
31 this.histogram_ = histogram; 38 this.histogram_ = histogram;
39 this.histograms_ = histograms;
32 if (this.isAttached) this.updateContents_(); 40 if (this.isAttached) this.updateContents_();
33 }, 41 },
34 42
35 updateContents_() { 43 updateContents_() {
36 throw new Error('dom-modules must override updateContents_()'); 44 throw new Error('dom-modules must override updateContents_()');
37 } 45 }
38 }; 46 };
39 47
40 return { 48 return {
41 DIAGNOSTIC_SPAN_BEHAVIOR, 49 DIAGNOSTIC_SPAN_BEHAVIOR,
42 }; 50 };
43 }); 51 });
44 </script> 52 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/diagnostic_span.html ('k') | tracing/tracing/value/ui/histogram_set_table.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698