Index: runtime/observatory/lib/src/elements/sample_buffer_control.dart |
diff --git a/runtime/observatory/lib/src/elements/sample_buffer_control.dart b/runtime/observatory/lib/src/elements/sample_buffer_control.dart |
index a82734e24f7d647e506ba513c2688d5b585ee244..3661c7cfd82c28929a51f9f747e43c28f4239cf7 100644 |
--- a/runtime/observatory/lib/src/elements/sample_buffer_control.dart |
+++ b/runtime/observatory/lib/src/elements/sample_buffer_control.dart |
@@ -29,7 +29,6 @@ class SampleBufferControlElement extends HtmlElement implements Renderable { |
Stream<SampleBufferControlChangedElement> get onTagChange => |
_onTagChange.stream; |
- M.VM _vm; |
Stream<M.SampleProfileLoadingProgressEvent> _progressStream; |
M.SampleProfileLoadingProgress _progress; |
M.SampleProfileTag _tag; |
@@ -47,21 +46,17 @@ class SampleBufferControlElement extends HtmlElement implements Renderable { |
set showTag(bool value) => _showTag = _r.checkAndReact(_showTag, value); |
set profileVM(bool value) => _profileVM = _r.checkAndReact(_profileVM, value); |
- factory SampleBufferControlElement( |
- M.VM vm, |
- M.SampleProfileLoadingProgress progress, |
+ factory SampleBufferControlElement(M.SampleProfileLoadingProgress progress, |
Stream<M.SampleProfileLoadingProgressEvent> progressStream, |
{M.SampleProfileTag selectedTag: M.SampleProfileTag.none, |
bool showTag: true, |
RenderingQueue queue}) { |
- assert(vm != null); |
assert(progress != null); |
assert(progressStream != null); |
assert(selectedTag != null); |
assert(showTag != null); |
SampleBufferControlElement e = document.createElement(tag.name); |
e._r = new RenderingScheduler(e, queue: queue); |
- e._vm = vm; |
e._progress = progress; |
e._progressStream = progressStream; |
e._tag = selectedTag; |
@@ -134,7 +129,7 @@ class SampleBufferControlElement extends HtmlElement implements Renderable { |
]; |
} |
- List<Element> _createDisabledMessage() { |
+ static List<Element> _createDisabledMessage() { |
return [ |
new DivElement() |
..classes = ['statusBox' 'shadow' 'center'] |
@@ -147,11 +142,8 @@ class SampleBufferControlElement extends HtmlElement implements Renderable { |
..innerHtml = 'Perhaps the <b>profile</b> ' |
'flag has been disabled for this VM.', |
new BRElement(), |
- new ButtonElement() |
- ..text = 'Enable profiler' |
- ..onClick.listen((_) { |
- _enableProfiler(); |
- }) |
+ new SpanElement()..text = 'See all ', |
+ new AnchorElement(href: Uris.flags())..text = 'vm flags' |
] |
] |
]; |
@@ -261,11 +253,5 @@ class SampleBufferControlElement extends HtmlElement implements Renderable { |
return new SampleBufferControlChangedElement(this); |
} |
- void _enableProfiler() { |
- _vm.enableProfiler().then((_) { |
- _triggerModeChange(_toEvent(null)); |
- }); |
- } |
- |
void _triggerModeChange(e) => _onTagChange.add(e); |
} |