blob: 38ca97dfdfd9763684bc20150fcd9eb26128aadd [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/core/analysis/analysis_sub_view.html">
<link rel="import" href="/base/ui/table.html">
<link rel="import" href="/base/units/util.html">
<polymer-element name="tr-c-a-multi-global-memory-dump-sub-view"
extends="tr-c-a-sub-view">
<template>
<style>
:host {
display: flex;
}
</style>
<tr-b-ui-table id="content"></tr-b-ui-table>
</template>
<script>
'use strict';
Polymer({
created: function() {
this.currentSelection_ = undefined;
},
get selection() {
return this.currentSelection_;
},
set selection(selection) {
this.currentSelection_ = selection;
selection = tr.b.asArray(selection).sort(
tr.b.Range.compareByMinTimes);
var table = this.$.content;
table.tableColumns = [
{
title: 'Dump',
value: function(row) {
var linkEl = document.createElement('tr-c-a-analysis-link');
linkEl.setSelectionAndContent(function() {
return new tr.c.Selection(row);
});
var spanEl = document.createElement('span');
spanEl.textContent = 'Global memory dump at ';
linkEl.appendChild(spanEl);
linkEl.appendChild(tr.b.units.createTimeStampSpan(row.start));
return linkEl;
}
}
];
table.showHeader = false;
table.tableRows = selection;
table.rebuild();
}
});
</script>
</polymer-element>