| 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 class_view_element; | 5 library class_view_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
| 9 import 'sample_buffer_control.dart'; | 9 import 'sample_buffer_control.dart'; |
| 10 import 'stack_trace_tree_config.dart'; | 10 import 'stack_trace_tree_config.dart'; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 var progress = (await stream.first).progress; | 86 var progress = (await stream.first).progress; |
| 87 shadowRoot.querySelector('#sampleBufferControl')..children = [ | 87 shadowRoot.querySelector('#sampleBufferControl')..children = [ |
| 88 new SampleBufferControlElement(progress, stream, queue: app.queue, | 88 new SampleBufferControlElement(progress, stream, queue: app.queue, |
| 89 selectedTag: _tag) | 89 selectedTag: _tag) |
| 90 ..onTagChange.listen((e) { | 90 ..onTagChange.listen((e) { |
| 91 _tag = e.element.selectedTag; | 91 _tag = e.element.selectedTag; |
| 92 refreshAllocationProfile(); | 92 refreshAllocationProfile(); |
| 93 }) | 93 }) |
| 94 ]; | 94 ]; |
| 95 if (M.isSampleProcessRunning(progress.status)) { | 95 if (M.isSampleProcessRunning(progress.status)) { |
| 96 progress = await stream.last; | 96 progress = (await stream.last).progress; |
| 97 } | 97 } |
| 98 if (progress.status == M.SampleProfileLoadingStatus.loaded) { | 98 if (progress.status == M.SampleProfileLoadingStatus.loaded) { |
| 99 shadowRoot.querySelector('#stackTraceTreeConfig')..children = [ | 99 shadowRoot.querySelector('#stackTraceTreeConfig')..children = [ |
| 100 new StackTraceTreeConfigElement( | 100 new StackTraceTreeConfigElement( |
| 101 queue: app.queue) | 101 queue: app.queue) |
| 102 ..showFilter = false | 102 ..showFilter = false |
| 103 ..onModeChange.listen((e) { | 103 ..onModeChange.listen((e) { |
| 104 cpuProfileTreeElement.mode = e.element.mode; | 104 cpuProfileTreeElement.mode = e.element.mode; |
| 105 }) | 105 }) |
| 106 ..onDirectionChange.listen((e) { | 106 ..onDirectionChange.listen((e) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 117 Future toggleAllocationTrace() { | 117 Future toggleAllocationTrace() { |
| 118 if (cls == null) { | 118 if (cls == null) { |
| 119 return new Future(refresh); | 119 return new Future(refresh); |
| 120 } | 120 } |
| 121 if (cls.traceAllocations) { | 121 if (cls.traceAllocations) { |
| 122 refreshAllocationProfile(); | 122 refreshAllocationProfile(); |
| 123 } | 123 } |
| 124 return cls.setTraceAllocations(!cls.traceAllocations).whenComplete(refresh); | 124 return cls.setTraceAllocations(!cls.traceAllocations).whenComplete(refresh); |
| 125 } | 125 } |
| 126 } | 126 } |
| OLD | NEW |