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

Side by Side Diff: runtime/bin/vmservice/observatory/lib/src/elements/eval_link.dart

Issue 810623005: Build Observatory with runtime (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
(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 library eval_link_element;
6
7 import 'package:observatory/service.dart';
8 import 'package:polymer/polymer.dart';
9
10 @CustomTag('eval-link')
11 class EvalLinkElement extends PolymerElement {
12 EvalLinkElement.created() : super.created();
13
14 @observable bool busy = false;
15 @published String label = "[evaluate]";
16 @published var callback = null;
17 @published var expr = '';
18 @published ServiceObject result = null;
19
20 void evalNow(var a, var b, var c) {
21 if (busy) {
22 return;
23 }
24 if (callback != null) {
25 busy = true;
26 result = null;
27 callback(expr).then((ServiceObject obj) {
28 result = obj;
29 }).whenComplete(() {
30 busy = false;
31 });
32 }
33 }
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698