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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/table_tree.dart

Issue 168833005: Add callers and callees to profiler output (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library table_tree_element;
6
7 import 'dart:html';
8 import 'observatory_element.dart';
9 import 'package:observatory/observatory.dart';
10 import 'package:polymer/polymer.dart';
11
12
13 @CustomTag('table-tree')
14 class TableTreeElement extends ObservatoryElement {
15 TableTreeElement.created() : super.created();
16 @published TableTree tree;
17
18 String padding(TableTreeRow row) {
19 return 'padding-left: ${row.depth * 16}px;';
20 }
21
22 String coloring(TableTreeRow row) {
23 const colors = const ['active', 'success', 'warning', 'danger', 'info'];
24 var index = row.depth % colors.length;
25 return colors[index];
26 }
27
28 void toggleExpanded(Event e, var detail, Element target) {
29 TableElement table = shadowRoot.querySelector('#_table');
30 var index = table.tBodies[0].children.indexOf(target.parent) - 1;
31 assert(index >= 0);
32 assert(index < tree.rows.length);
33 tree.toggle(index);
34 }
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698