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

Unified Diff: runtime/observatory/lib/src/elements/sample_buffer_control.dart

Issue 2990173002: Revert "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, o… (Closed)
Patch Set: Created 3 years, 4 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
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);
}
« no previous file with comments | « runtime/observatory/lib/src/elements/native_memory_profiler.dart ('k') | runtime/observatory/lib/src/models/objects/vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698