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

Side by Side Diff: runtime/observatory/lib/src/elements/timeline_page.dart

Issue 1722373002: Add ability to save and load timelines from Observatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/timeline_page.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 timeline_page_element; 5 library timeline_page_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'observatory_element.dart'; 10 import 'observatory_element.dart';
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'recordedStreams': ['all'], 60 'recordedStreams': ['all'],
61 }); 61 });
62 } 62 }
63 63
64 Future recordOff() async { 64 Future recordOff() async {
65 return app.vm.invokeRpc('_setVMTimelineFlags', { 65 return app.vm.invokeRpc('_setVMTimelineFlags', {
66 'recordedStreams': [], 66 'recordedStreams': [],
67 }); 67 });
68 } 68 }
69 69
70 Future saveTimeline() async {
71 return postMessage('save');
72 }
73
74 Future loadTimeline() async {
75 return postMessage('load');
76 }
77
70 _updateSize() { 78 _updateSize() {
71 IFrameElement e = $['root']; 79 IFrameElement e = $['root'];
72 final totalHeight = window.innerHeight; 80 final totalHeight = window.innerHeight;
73 final top = e.offset.top; 81 final top = e.offset.top;
74 final bottomMargin = 32; 82 final bottomMargin = 32;
75 final mainHeight = totalHeight - top - bottomMargin; 83 final mainHeight = totalHeight - top - bottomMargin;
76 e.style.setProperty('height', '${mainHeight}px'); 84 e.style.setProperty('height', '${mainHeight}px');
77 e.style.setProperty('width', '100%'); 85 e.style.setProperty('width', '100%');
78 } 86 }
79 87
80 88
81 StreamSubscription _resizeSubscription; 89 StreamSubscription _resizeSubscription;
82 } 90 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/timeline_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698