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

Unified Diff: runtime/observatory/lib/src/elements/context_ref_wrapper.dart

Issue 2244433003: Converted Observatory refs elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: All element tested Created 4 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: runtime/observatory/lib/src/elements/context_ref_wrapper.dart
diff --git a/runtime/observatory/lib/src/elements/library_ref_wrapper.dart b/runtime/observatory/lib/src/elements/context_ref_wrapper.dart
similarity index 56%
copy from runtime/observatory/lib/src/elements/library_ref_wrapper.dart
copy to runtime/observatory/lib/src/elements/context_ref_wrapper.dart
index 0a2caf40eb1b065661f0a4f783bd8ed27971ca57..b950d3209a5ed7ee1619a8d9e5cad20ea501bf8a 100644
--- a/runtime/observatory/lib/src/elements/library_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/context_ref_wrapper.dart
@@ -5,25 +5,28 @@
import 'dart:html';
import 'package:observatory/app.dart';
-import 'package:observatory/service_html.dart' show Library;
-import 'package:observatory/src/elements/library_ref.dart';
+import 'package:observatory/service_html.dart' show Context;
+import 'package:observatory/src/elements/context_ref.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/shims/binding.dart';
@bindable
-class LibraryRefElementWrapper extends HtmlElement {
+class ContextRefElementWrapper extends HtmlElement {
- static const binder = const Binder<LibraryRefElementWrapper>(const {
+ static const binder = const Binder<ContextRefElementWrapper>(const {
'ref': #ref
});
- static const tag = const Tag<LibraryRefElementWrapper>('library-ref');
+ static const tag = const Tag<ContextRefElementWrapper>('context-ref');
- Library _library;
- Library get ref => _library;
- void set ref(Library ref) { _library = ref; render(); }
+ Context _context;
+ Context get ref => _context;
+ void set ref(Context ref) {
+ _context = ref;
+ render();
+ }
- LibraryRefElementWrapper.created() : super.created() {
+ ContextRefElementWrapper.created() : super.created() {
binder.registerCallback(this);
createShadowRoot();
render();
@@ -42,14 +45,17 @@ class LibraryRefElementWrapper extends HtmlElement {
shadowRoot.children = [
new StyleElement()
..text = '''
- library-ref-wrapped > a[href]:hover {
+ context-ref-wrapped > a[href]:hover {
text-decoration: underline;
}
- library-ref-wrapped > a[href] {
+ context-ref-wrapped > a[href] {
color: #0489c3;
text-decoration: none;
+ }
+ context-ref-wrapped .empathize {
+ font-style: italic;
}''',
- new LibraryRefElement(_library.isolate, _library,
+ new ContextRefElement(_context.isolate, _context,
queue: ObservatoryApplication.app.queue)
];
}

Powered by Google App Engine
This is Rietveld 408576698