Chris Craik | b122baf | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <!-- |
| 3 | Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 | Use of this source code is governed by a BSD-style license that can be |
| 5 | found in the LICENSE file. |
| 6 | --> |
| 7 | |
| 8 | <link rel="import" href="/core/analysis/analysis_sub_view.html"> |
Chris Craik | beca7ae | 2015-04-07 13:29:55 -0700 | [diff] [blame] | 9 | <link rel="import" href="/core/analysis/multi_event_sub_view.html"> |
Chris Craik | b122baf | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 10 | |
| 11 | <polymer-element name="tv-c-multi-instant-event-sub-view" |
| 12 | extends="tracing-analysis-sub-view"> |
| 13 | <template> |
| 14 | <style> |
| 15 | :host { |
| 16 | display: block; |
| 17 | } |
| 18 | </style> |
| 19 | <div id='content'></div> |
| 20 | </template> |
| 21 | |
| 22 | <script> |
| 23 | 'use strict'; |
| 24 | |
| 25 | Polymer({ |
| 26 | created: function() { |
| 27 | this.currentSelection_ = undefined; |
| 28 | }, |
| 29 | |
| 30 | set selection(selection) { |
| 31 | this.$.content.textContent = ''; |
Chris Craik | beca7ae | 2015-04-07 13:29:55 -0700 | [diff] [blame] | 32 | var realView = document.createElement('tv-c-a-multi-event-sub-view'); |
| 33 | realView.eventsHaveDuration = false; |
| 34 | realView.eventsHaveSubRows = false; |
Chris Craik | b122baf | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 35 | |
| 36 | this.$.content.appendChild(realView); |
| 37 | realView.setSelectionWithoutErrorChecks(selection); |
| 38 | |
| 39 | this.currentSelection_ = selection; |
| 40 | }, |
| 41 | |
| 42 | get selection() { |
| 43 | return this.currentSelection_; |
| 44 | } |
| 45 | }); |
| 46 | </script> |
Chris Craik | 44c2820 | 2015-05-12 17:25:16 -0700 | [diff] [blame^] | 47 | </polymer-element> |