| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 heap_map_element; | 5 library heap_map_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 import 'package:observatory/models.dart' as M; | 10 import 'package:observatory/models.dart' as M; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 S.ServiceMap _fragmentation; | 91 S.ServiceMap _fragmentation; |
| 92 | 92 |
| 93 void render() { | 93 void render() { |
| 94 if (_canvas == null) { | 94 if (_canvas == null) { |
| 95 _canvas = new CanvasElement() | 95 _canvas = new CanvasElement() |
| 96 ..width = 1 | 96 ..width = 1 |
| 97 ..height = 1 | 97 ..height = 1 |
| 98 ..onMouseMove.listen(_handleMouseMove) | 98 ..onMouseMove.listen(_handleMouseMove) |
| 99 ..onMouseDown.listen(_handleClick); | 99 ..onMouseDown.listen(_handleClick); |
| 100 } | 100 } |
| 101 |
| 102 // Set hover text to describe the object under the cursor. |
| 103 _canvas.title = _status; |
| 104 |
| 101 children = [ | 105 children = [ |
| 102 navBar([ | 106 navBar([ |
| 103 new NavTopMenuElement(queue: _r.queue), | 107 new NavTopMenuElement(queue: _r.queue), |
| 104 new NavVMMenuElement(_vm, _events, queue: _r.queue), | 108 new NavVMMenuElement(_vm, _events, queue: _r.queue), |
| 105 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), | 109 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), |
| 106 navMenu('heap map'), | 110 navMenu('heap map'), |
| 107 new NavRefreshElement(queue: _r.queue) | 111 new NavRefreshElement(queue: _r.queue) |
| 108 ..onRefresh.listen((_) => _refresh()), | 112 ..onRefresh.listen((_) => _refresh()), |
| 109 new NavNotifyElement(_notifications, queue: _r.queue) | 113 new NavNotifyElement(_notifications, queue: _r.queue) |
| 110 ]), | 114 ]), |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 314 |
| 311 // The row-major index of this pixel. | 315 // The row-major index of this pixel. |
| 312 int get index => _dataIndex ~/ NUM_COLOR_COMPONENTS; | 316 int get index => _dataIndex ~/ NUM_COLOR_COMPONENTS; |
| 313 } | 317 } |
| 314 | 318 |
| 315 class ObjectInfo { | 319 class ObjectInfo { |
| 316 final address; | 320 final address; |
| 317 final size; | 321 final size; |
| 318 ObjectInfo(this.address, this.size); | 322 ObjectInfo(this.address, this.size); |
| 319 } | 323 } |
| OLD | NEW |