OLD | NEW |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 void leftView() { | 66 void leftView() { |
67 super.leftView(); | 67 super.leftView(); |
68 if (_updateTimer != null) { | 68 if (_updateTimer != null) { |
69 _updateTimer.cancel(); | 69 _updateTimer.cancel(); |
70 _updateTimer = null; | 70 _updateTimer = null; |
71 } | 71 } |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
| 75 @CustomTag('io-socket-ref') |
| 76 class IOSocketRefElement extends ServiceRefElement { |
| 77 IOSocketRefElement.created() : super.created(); |
| 78 } |
| 79 |
| 80 @CustomTag('io-socket-view') |
| 81 class IOSocketViewElement extends ObservatoryElement { |
| 82 @published ServiceMap socket; |
| 83 |
| 84 IOSocketViewElement.created() : super.created(); |
| 85 |
| 86 void refresh(var done) { |
| 87 socket.reload().whenComplete(done); |
| 88 } |
| 89 } |
| 90 |
75 @CustomTag('io-random-access-file-list-view') | 91 @CustomTag('io-random-access-file-list-view') |
76 class IORandomAccessFileListViewElement extends ObservatoryElement { | 92 class IORandomAccessFileListViewElement extends ObservatoryElement { |
77 @published ServiceMap list; | 93 @published ServiceMap list; |
78 | 94 |
79 IORandomAccessFileListViewElement.created() : super.created(); | 95 IORandomAccessFileListViewElement.created() : super.created(); |
80 | 96 |
81 void refresh(var done) { | 97 void refresh(var done) { |
82 list.reload().whenComplete(done); | 98 list.reload().whenComplete(done); |
83 } | 99 } |
84 } | 100 } |
(...skipping 30 matching lines...) Expand all Loading... |
115 } | 131 } |
116 | 132 |
117 void leftView() { | 133 void leftView() { |
118 super.leftView(); | 134 super.leftView(); |
119 if (_updateTimer != null) { | 135 if (_updateTimer != null) { |
120 _updateTimer.cancel(); | 136 _updateTimer.cancel(); |
121 _updateTimer = null; | 137 _updateTimer = null; |
122 } | 138 } |
123 } | 139 } |
124 } | 140 } |
OLD | NEW |