blob: 2a7902a26bf18ab3a2b5634afb73c40b49620ba2 [file] [log] [blame]
Chris Craik44c28202015-05-12 17:25:16 -07001<!DOCTYPE html>
2<!--
3Copyright (c) 2015 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7
8<link rel="import" href="/core/analysis/analysis_sub_view.html">
9<link rel="import" href="/core/analysis/table_builder.html">
10<link rel="import" href="/core/analysis/util.html">
11
12<polymer-element name="tv-c-multi-process-memory-dump-sub-view"
13 extends="tracing-analysis-sub-view">
14 <template>
15 <style>
16 :host {
17 display: flex;
18 }
19 </style>
20 <tracing-analysis-nested-table id="content"></tracing-analysis-nested-table>
21 </template>
22
23 <script>
24 'use strict';
25
26 Polymer({
27 created: function() {
28 this.currentSelection_ = undefined;
29 },
30
31 get selection() {
32 return this.currentSelection_;
33 },
34
35 set selection(selection) {
36 this.currentSelection_ = selection;
37
38 selection = tv.b.asArray(selection).sort(
39 tv.b.Range.compareByMinTimes);
40
41 var table = this.$.content;
42 table.tableColumns = [
43 {
44 title: 'Dump',
45 value: function(row) {
46 var linkEl = document.createElement('tv-c-analysis-link');
47 linkEl.setSelectionAndContent(function() {
48 return new tv.c.Selection(row);
49 });
50 var spanEl = document.createElement('span');
51 spanEl.textContent = 'Process memory dump at ';
52 linkEl.appendChild(spanEl);
53 linkEl.appendChild(tv.c.analysis.createTimeStamp(row.start));
54 return linkEl;
55 }
56 }
57 ];
58 table.showHeader = false;
59 table.tableRows = selection;
60 table.rebuild();
61 }
62 });
63 </script>
64</polymer-element>