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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/io_view.dart

Issue 300043011: Add WebSockets to Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
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 io_view_element; 5 library io_view_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'service_ref.dart'; 9 import 'service_ref.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 class IOSocketViewElement extends ObservatoryElement { 92 class IOSocketViewElement extends ObservatoryElement {
93 @published ServiceMap socket; 93 @published ServiceMap socket;
94 94
95 IOSocketViewElement.created() : super.created(); 95 IOSocketViewElement.created() : super.created();
96 96
97 void refresh(var done) { 97 void refresh(var done) {
98 socket.reload().whenComplete(done); 98 socket.reload().whenComplete(done);
99 } 99 }
100 } 100 }
101 101
102 @CustomTag('io-web-socket-ref')
103 class IOWebSocketRefElement extends ServiceRefElement {
104 IOWebSocketRefElement.created() : super.created();
105 }
106
107 @CustomTag('io-web-socket-list-view')
108 class IOWebSocketListViewElement extends ObservatoryElement {
109 @published ServiceMap list;
110
111 IOWebSocketListViewElement.created() : super.created();
112
113 void refresh(var done) {
114 list.reload().whenComplete(done);
115 }
116 }
117
118 @CustomTag('io-web-socket-view')
119 class IOWebSocketViewElement extends ObservatoryElement {
120 @published ServiceMap webSocket;
121
122 IOWebSocketViewElement.created() : super.created();
123
124 void refresh(var done) {
125 webSocket.reload().whenComplete(done);
126 }
127 }
128
102 @CustomTag('io-random-access-file-list-view') 129 @CustomTag('io-random-access-file-list-view')
103 class IORandomAccessFileListViewElement extends ObservatoryElement { 130 class IORandomAccessFileListViewElement extends ObservatoryElement {
104 @published ServiceMap list; 131 @published ServiceMap list;
105 132
106 IORandomAccessFileListViewElement.created() : super.created(); 133 IORandomAccessFileListViewElement.created() : super.created();
107 134
108 void refresh(var done) { 135 void refresh(var done) {
109 list.reload().whenComplete(done); 136 list.reload().whenComplete(done);
110 } 137 }
111 } 138 }
(...skipping 30 matching lines...) Expand all
142 } 169 }
143 170
144 void leftView() { 171 void leftView() {
145 super.leftView(); 172 super.leftView();
146 if (_updateTimer != null) { 173 if (_updateTimer != null) {
147 _updateTimer.cancel(); 174 _updateTimer.cancel();
148 _updateTimer = null; 175 _updateTimer = null;
149 } 176 }
150 } 177 }
151 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698