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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/message_viewer.dart

Issue 113513004: Handle vmservice messages while at breakpoint. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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
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 message_viewer_element; 5 library message_viewer_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 9
10 @CustomTag('message-viewer') 10 @CustomTag('message-viewer')
11 class MessageViewerElement extends ObservatoryElement { 11 class MessageViewerElement extends ObservatoryElement {
12 Map _message; 12 Map _message;
13 @published Map get message => _message; 13 @published Map get message => _message;
14 14
15 @published set message(Map m) { 15 @published set message(Map m) {
16 _message = m; 16 _message = m;
17 notifyPropertyChange(#messageType, "", messageType); 17 notifyPropertyChange(#messageType, "", messageType);
18 notifyPropertyChange(#members, [], members); 18 notifyPropertyChange(#members, [], members);
19 } 19 }
20 20
21 MessageViewerElement.created() : super.created(); 21 MessageViewerElement.created() : super.created();
22 22
23 String get messageType { 23 String get messageType {
24 if (message == null || message['type'] == null) { 24 if (message == null || message['type'] == null) {
25 return 'Error'; 25 return 'Error';
26 } 26 }
27 print("Received message of type '${message['type']}' :\n$message");
27 return message['type']; 28 return message['type'];
28 } 29 }
29 30
30 List<Map> get members { 31 List<Map> get members {
31 if (message == null || message['members'] == null) { 32 if (message == null || message['members'] == null) {
32 return []; 33 return [];
33 } 34 }
34 return message['members']; 35 return message['members'];
35 } 36 }
36 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698