OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <!-- | |
3 Copyright 2016 The Chromium Authors. All rights reserved. | |
eakuefner
2017/08/18 23:24:29
2017
| |
4 Use of this source code is governed by a BSD-style license that can be | |
5 found in the LICENSE file. | |
6 --> | |
7 | |
8 <link rel="import" href="/tracing/base/base.html"> | |
9 | |
10 <script> | |
11 'use strict'; | |
12 tr.exportTo('tr.v.ui', function() { | |
13 const DIAGNOSTIC_SPAN_BEHAVIOR = { | |
14 created() { | |
15 this.diagnostic_ = undefined; | |
16 this.name_ = undefined; | |
17 this.histogram_ = undefined; | |
18 }, | |
19 | |
20 attached() { | |
21 if (this.diagnostic_) this.updateContents_(); | |
22 }, | |
23 | |
24 get diagnostic() { | |
25 return this.diagnostic_; | |
26 }, | |
27 | |
28 build(diagnostic, name, histogram) { | |
29 this.diagnostic_ = diagnostic; | |
30 this.name_ = name; | |
31 this.histogram_ = histogram; | |
32 if (this.isAttached) this.updateContents_(); | |
33 }, | |
34 | |
35 updateContents_() { | |
36 throw new Error('dom-modules must override updateContents_()'); | |
37 } | |
38 }; | |
39 | |
40 return { | |
41 DIAGNOSTIC_SPAN_BEHAVIOR, | |
42 }; | |
43 }); | |
44 </script> | |
OLD | NEW |