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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/isolate_summary.dart

Issue 299823004: Upgrade Observatory to Polymer 0.10.x (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library isolate_summary_element; 5 library isolate_summary_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/app.dart'; 10 import 'package:observatory/app.dart';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 _chart.draw(_table); 83 _chart.draw(_table);
84 } 84 }
85 } 85 }
86 86
87 @CustomTag('isolate-counter-chart') 87 @CustomTag('isolate-counter-chart')
88 class IsolateCounterChartElement extends ObservatoryElement { 88 class IsolateCounterChartElement extends ObservatoryElement {
89 IsolateCounterChartElement.created() : super.created(); 89 IsolateCounterChartElement.created() : super.created();
90 90
91 @published ObservableMap counters; 91 @published ObservableMap counters;
92 CounterChart chart = new CounterChart(); 92 CounterChart chart;
93 93
94 void countersChanged(oldValue) { 94 void countersChanged(oldValue) {
95 if (counters == null) { 95 if (counters == null) {
96 return; 96 return;
97 } 97 }
98 // Lazily create the chart.
99 if (GoogleChart.ready && chart == null) {
100 chart = new CounterChart();
101 }
102 if (chart == null) {
103 return;
104 }
98 chart.update(counters); 105 chart.update(counters);
99 var element = shadowRoot.querySelector('#counterPieChart'); 106 var element = shadowRoot.querySelector('#counterPieChart');
100 if (element != null) { 107 if (element != null) {
101 chart.draw(element); 108 chart.draw(element);
102 } 109 }
103 } 110 }
104 } 111 }
105 112
106 113
107 114
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698