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

Unified Diff: tracing/tracing/value/ui/generic_set_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/generic_set_span.html
diff --git a/tracing/tracing/value/ui/generic_set_span.html b/tracing/tracing/value/ui/generic_set_span.html
index b80b5b62d2ecff7d23c1f0f70ca3dfeab90543af..8e0353df53f417cba9a985a20651c66b56db55aa 100644
--- a/tracing/tracing/value/ui/generic_set_span.html
+++ b/tracing/tracing/value/ui/generic_set_span.html
@@ -6,17 +6,21 @@ found in the LICENSE file.
-->
<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
+<link rel="import" href="/tracing/value/ui/diagnostic_span_behavior.html">
<dom-module id="tr-v-ui-generic-set-span">
<template>
<tr-ui-a-generic-object-view id="generic"></tr-ui-a-generic-object-view>
<template is="dom-repeat" items="{{strings_}}">[[item]]<br></template>
</template>
+</dom-module>
- <script>
- 'use strict';
+<script>
+'use strict';
+tr.exportTo('tr.v.ui', function() {
Polymer({
is: 'tr-v-ui-generic-set-span',
+ behaviors: [tr.v.ui.DIAGNOSTIC_SPAN_BEHAVIOR],
properties: {
strings_: {
@@ -24,19 +28,6 @@ found in the LICENSE file.
},
},
- ready() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
updateContents_() {
if (this.diagnostic === undefined) {
this.$.generic.object = undefined;
@@ -68,5 +59,8 @@ found in the LICENSE file.
}
}
});
- </script>
-</dom-module>
+
+ return {
+ };
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698