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

Unified Diff: runtime/observatory/lib/src/app/application.dart

Issue 2299893003: Converted Observatory logging-page element (Closed)
Patch Set: Updated observatory_sources.gypi 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/lib/event.dart ('k') | runtime/observatory/lib/src/app/page.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/app/application.dart
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index ea23d604fa59fd53017af2886c7d71028324b9b7..ff4fd3d1000153f938c8d29e2abffe2942ea75e7 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -54,6 +54,7 @@ class ObservatoryApplication extends Observable {
}
StreamSubscription _gcSubscription;
+ StreamSubscription _loggingSubscription;
Future startGCEventListener() async {
if (_gcSubscription != null || _vm == null) {
@@ -62,6 +63,14 @@ class ObservatoryApplication extends Observable {
_gcSubscription = await _vm.listenEventStream(VM.kGCStream, _onEvent);
}
+ Future startLoggingEventListener() async {
+ if (_loggingSubscription != null || _vm == null) {
+ return;
+ }
+ _loggingSubscription =
+ await _vm.listenEventStream(Isolate.kLoggingStream, _onEvent);
+ }
+
Future stopGCEventListener() async {
if (_gcSubscription == null) {
return;
@@ -70,6 +79,14 @@ class ObservatoryApplication extends Observable {
_gcSubscription = null;
}
+ Future stopLoggingEventListener() async {
+ if (_loggingSubscription == null) {
+ return;
+ }
+ _loggingSubscription.cancel();
+ _loggingSubscription = null;
+ }
+
@reflectable final ObservatoryApplicationElement rootElement;
@@ -93,7 +110,6 @@ class ObservatoryApplication extends Observable {
void _onEvent(ServiceEvent event) {
assert(event.kind != ServiceEvent.kNone);
-
M.Event e = createEventFromServiceEvent(event);
if (e != null) {
events.add(e);
« no previous file with comments | « runtime/observatory/lib/event.dart ('k') | runtime/observatory/lib/src/app/page.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698