| <!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="/core/analysis/table_builder.html"> |
| <link rel="import" href="/core/analysis/util.html"> |
| |
| <polymer-element name="tv-c-multi-global-memory-dump-sub-view" |
| extends="tracing-analysis-sub-view"> |
| <template> |
| <style> |
| :host { |
| display: flex; |
| } |
| </style> |
| <tracing-analysis-nested-table id="content"></tracing-analysis-nested-table> |
| </template> |
| |
| <script> |
| 'use strict'; |
| |
| Polymer({ |
| created: function() { |
| this.currentSelection_ = undefined; |
| }, |
| |
| get selection() { |
| return this.currentSelection_; |
| }, |
| |
| set selection(selection) { |
| this.currentSelection_ = selection; |
| |
| selection = tv.b.asArray(selection).sort( |
| tv.b.Range.compareByMinTimes); |
| |
| var table = this.$.content; |
| table.tableColumns = [ |
| { |
| title: 'Dump', |
| value: function(row) { |
| var linkEl = document.createElement('tv-c-analysis-link'); |
| linkEl.setSelectionAndContent(function() { |
| return new tv.c.Selection(row); |
| }); |
| var spanEl = document.createElement('span'); |
| spanEl.textContent = 'Global memory dump at '; |
| linkEl.appendChild(spanEl); |
| linkEl.appendChild(tv.c.analysis.createTimeStamp(row.start)); |
| return linkEl; |
| } |
| } |
| ]; |
| table.showHeader = false; |
| table.tableRows = selection; |
| table.rebuild(); |
| } |
| }); |
| </script> |
| </polymer-element> |