OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/model/event_set.html"> | 8 <link rel="import" href="/tracing/model/event_set.html"> |
9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html"> | 9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html"> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 * @param {!(EventRef|tr.model.Event)} event | 62 * @param {!(EventRef|tr.model.Event)} event |
63 */ | 63 */ |
64 push: function(event) { | 64 push: function(event) { |
65 this.eventsByStableId_[event.stableId] = event; | 65 this.eventsByStableId_[event.stableId] = event; |
66 }, | 66 }, |
67 | 67 |
68 /** | 68 /** |
69 * @return {!Array.<!(EventRef|tr.model.Event)>} | 69 * @return {!Array.<!(EventRef|tr.model.Event)>} |
70 */ | 70 */ |
71 get events() { | 71 get events() { |
72 return tr.b.dictionaryValues(this.eventsByStableId_); | 72 return new tr.model.EventSet( |
| 73 tr.b.dictionaryValues(this.eventsByStableId_)); |
73 }, | 74 }, |
74 | 75 |
75 /** | 76 /** |
76 * Resolve all EventRefs into Events by finding their stableIds in |model|. | 77 * Resolve all EventRefs into Events by finding their stableIds in |model|. |
77 * If a stableId cannot be found and |opt_required| is true, then throw an | 78 * If a stableId cannot be found and |opt_required| is true, then throw an |
78 * Error. | 79 * Error. |
79 * If a stableId cannot be found and |opt_required| is false, then the | 80 * If a stableId cannot be found and |opt_required| is false, then the |
80 * EventRef will remain an EventRef. | 81 * EventRef will remain an EventRef. |
81 * | 82 * |
82 * @param {!tr.model.Model} model | 83 * @param {!tr.model.Model} model |
(...skipping 30 matching lines...) Expand all Loading... |
113 | 114 |
114 tr.v.d.Diagnostic.register(RelatedEventSet, { | 115 tr.v.d.Diagnostic.register(RelatedEventSet, { |
115 elementName: 'tr-v-ui-related-event-set-span' | 116 elementName: 'tr-v-ui-related-event-set-span' |
116 }); | 117 }); |
117 | 118 |
118 return { | 119 return { |
119 RelatedEventSet: RelatedEventSet | 120 RelatedEventSet: RelatedEventSet |
120 }; | 121 }; |
121 }); | 122 }); |
122 </script> | 123 </script> |
OLD | NEW |