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

Unified Diff: tracing/tracing/value/ui/scalar_diagnostic_span.html

Issue 3002973002: Refactor diagnostic spans to share a polymer behavior. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/value/ui/scalar_diagnostic_span.html
diff --git a/tracing/tracing/value/ui/scalar_diagnostic_span.html b/tracing/tracing/value/ui/scalar_diagnostic_span.html
index 2b90d3a9d86127c6544ff21d4097e04e480fd4f0..631c3696f8cef4aaf319bc30253d664cdc84a204 100644
--- a/tracing/tracing/value/ui/scalar_diagnostic_span.html
+++ b/tracing/tracing/value/ui/scalar_diagnostic_span.html
@@ -5,35 +5,28 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
+<link rel="import" href="/tracing/value/ui/diagnostic_span_behavior.html">
<link rel="import" href="/tracing/value/ui/scalar_span.html">
<dom-module id="tr-v-ui-scalar-diagnostic-span">
<template>
<tr-v-ui-scalar-span id="scalar"></tr-v-ui-scalar-span>
</template>
+</dom-module>
- <script>
- 'use strict';
+<script>
+'use strict';
+tr.exportTo('tr.v.ui', function() {
Polymer({
is: 'tr-v-ui-scalar-diagnostic-span',
-
- ready() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
+ behaviors: [tr.v.ui.DIAGNOSTIC_SPAN_BEHAVIOR],
updateContents_() {
this.$.scalar.setValueAndUnit(this.diagnostic.value.value,
this.diagnostic.value.unit);
}
});
- </script>
-</dom-module>
+
+ return {};
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698