| <!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/memory_dump_view.html"> |
| |
| <polymer-element name="tr-c-a-single-global-memory-dump-sub-view" |
| extends="tr-c-a-sub-view"> |
| <template> |
| <tr-c-a-memory-dump-view id="memory_dump_view"> |
| </tr-c-a-memory-dump-view> |
| </template> |
| <script> |
| 'use strict'; |
| |
| Polymer({ |
| set selection(selection) { |
| if (selection.length !== 1) |
| throw new Error('Only supports a single global memory dump'); |
| if (!(selection[0] instanceof tr.model.GlobalMemoryDump)) |
| throw new Error('Only supports global memory dumps'); |
| this.currentSelection_ = selection; |
| this.$.memory_dump_view.processMemoryDumps = tr.b.dictionaryValues( |
| selection[0].processMemoryDumps); |
| }, |
| |
| get selection() { |
| return this.currentSelection_; |
| }, |
| |
| get requiresTallView() { |
| return true; |
| } |
| }); |
| </script> |
| </polymer-element> |