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

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

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:html';
6
7 import 'package:observatory/app.dart';
8 import 'package:observatory/service.dart' show ServiceFunction;
9 import 'package:observatory/src/elements/function_ref.dart';
10 import 'package:observatory/src/elements/helpers/tag.dart';
11 import 'package:observatory/src/elements/shims/binding.dart';
12
13 @bindable
14 class FunctionRefElementWrapper extends HtmlElement {
15
16 static const binder = const Binder<FunctionRefElementWrapper>(const {
17 'ref': #ref, 'qualified': #qualified
18 });
19
20 static const tag = const Tag<FunctionRefElementWrapper>('function-ref');
21
22 bool _qualified = true;
23 ServiceFunction _function;
24
25 bool get qualified => _qualified;
26 ServiceFunction get ref => _function;
27
28 void set qualified(bool value) {
29 _qualified = value;
30 render();
31 }
32 void set ref(ServiceFunction value) {
33 _function = value;
34 render();
35 }
36
37 FunctionRefElementWrapper.created() : super.created() {
38 binder.registerCallback(this);
39 createShadowRoot();
40 render();
41 }
42
43 @override
44 void attached() {
45 super.attached();
46 render();
47 }
48
49 void render() {
50 shadowRoot.children = [];
51 if (ref == null) {
52 return;
53 }
54
55 shadowRoot.children = [
56 new StyleElement()
57 ..text = '''
58 class-ref-wrapped > a[href]:hover,
59 function-ref-wrapped > a[href]:hover {
60 text-decoration: underline;
61 }
62 class-ref-wrapped > a[href],
63 function-ref-wrapped > a[href] {
64 color: #0489c3;
65 text-decoration: none;
66 }''',
67 new FunctionRefElement(_function.isolate, _function, qualified: qualified,
68 queue: ObservatoryApplication.app.queue)
69 ];
70 }
71 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/function_ref.dart ('k') | runtime/observatory/lib/src/elements/function_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698