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

Side by Side Diff: runtime/observatory/lib/src/elements/service_view.dart

Issue 2306483002: Converted Observatory code-view element (Closed)
Patch Set: Fixed tables headers Created 4 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 // 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 service_object_view_element; 5 library service_object_view_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'package:observatory/tracer.dart'; 10 import 'package:observatory/tracer.dart';
11 import 'package:observatory/elements.dart'; 11 import 'package:observatory/elements.dart';
12 import 'package:polymer/polymer.dart'; 12 import 'package:polymer/polymer.dart';
13 import 'observatory_element.dart'; 13 import 'observatory_element.dart';
14 14
15 @CustomTag('service-view') 15 @CustomTag('service-view')
16 class ServiceObjectViewElement extends ObservatoryElement { 16 class ServiceObjectViewElement extends ObservatoryElement {
17 @published ServiceObject object; 17 @published ServiceObject object;
18 @published ObservableMap args; 18 @published ObservableMap args;
19 19
20 ServiceObjectViewElement.created() : super.created(); 20 ServiceObjectViewElement.created() : super.created();
21 21
22 ObservatoryElement _constructElementForObject() { 22 ObservatoryElement _constructElementForObject() {
23 var type = object.type; 23 var type = object.type;
24 switch (type) { 24 switch (type) {
25 case 'Code':
26 CodeViewElement element = new Element.tag('code-view');
27 element.code = object;
28 return element;
29 default: 25 default:
30 JsonViewElement element = new Element.tag('json-view'); 26 JsonViewElement element = new Element.tag('json-view');
31 element.map = object; 27 element.map = object;
32 return element; 28 return element;
33 } 29 }
34 } 30 }
35 31
36 objectChanged(oldValue) { 32 objectChanged(oldValue) {
37 // Remove the current view. 33 // Remove the current view.
38 children.clear(); 34 children.clear();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 92
97 dynamic expander() { 93 dynamic expander() {
98 return expandEvent; 94 return expandEvent;
99 } 95 }
100 96
101 void expandEvent(bool exp, var done) { 97 void expandEvent(bool exp, var done) {
102 expand = exp; 98 expand = exp;
103 done(); 99 done();
104 } 100 }
105 } 101 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/helpers/any_ref.dart ('k') | runtime/observatory/lib/src/elements/service_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698