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

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

Issue 2277543004: Converted Observatory script-inset & source-inset elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed long line 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 source_link_element; 5 library source_link_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:observatory/models.dart' 9 import 'package:observatory/models.dart'
10 show IsolateRef, SourceLocation, Script, ScriptRepository; 10 show IsolateRef, SourceLocation, Script, ScriptRepository;
(...skipping 26 matching lines...) Expand all
37 e._location = location; 37 e._location = location;
38 e._repository = repository; 38 e._repository = repository;
39 return e; 39 return e;
40 } 40 }
41 41
42 SourceLinkElement.created() : super.created(); 42 SourceLinkElement.created() : super.created();
43 43
44 @override 44 @override
45 void attached() { 45 void attached() {
46 super.attached(); 46 super.attached();
47 _repository.get(_location.script.id).then((script) { 47 _repository.get(_isolate, _location.script.id).then((script) {
48 _script = script; 48 _script = script;
49 _r.dirty(); 49 _r.dirty();
50 }); 50 });
51 _r.enable(); 51 _r.enable();
52 } 52 }
53 53
54 @override 54 @override
55 void detached() { 55 void detached() {
56 super.detached(); 56 super.detached();
57 children = []; 57 children = [];
(...skipping 10 matching lines...) Expand all
68 int column = _script.tokenToCol(token); 68 int column = _script.tokenToCol(token);
69 children = [ 69 children = [
70 new AnchorElement( 70 new AnchorElement(
71 href: Uris.inspect(isolate, object: _script, pos: token)) 71 href: Uris.inspect(isolate, object: _script, pos: token))
72 ..title = _script.uri 72 ..title = _script.uri
73 ..text = '${label}:${line}:${column}' 73 ..text = '${label}:${line}:${column}'
74 ]; 74 ];
75 } 75 }
76 } 76 }
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698