| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 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/base/guid.html"> | 8 <link rel="import" href="/tracing/base/guid.html"> |
| 9 <link rel="import" href="/tracing/base/range.html"> | 9 <link rel="import" href="/tracing/base/math/range.html"> |
| 10 <link rel="import" href="/tracing/model/event_set.html"> | 10 <link rel="import" href="/tracing/model/event_set.html"> |
| 11 <link rel="import" href="/tracing/model/selectable_item.html"> | 11 <link rel="import" href="/tracing/model/selectable_item.html"> |
| 12 <link rel="import" href="/tracing/model/selection_state.html"> | 12 <link rel="import" href="/tracing/model/selection_state.html"> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 'use strict'; | 15 'use strict'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @fileoverview Provides the Event class. | 18 * @fileoverview Provides the Event class. |
| 19 */ | 19 */ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 get guid() { | 42 get guid() { |
| 43 return this.guid_; | 43 return this.guid_; |
| 44 }, | 44 }, |
| 45 | 45 |
| 46 get stableId() { | 46 get stableId() { |
| 47 return undefined; | 47 return undefined; |
| 48 }, | 48 }, |
| 49 | 49 |
| 50 get range() { | 50 get range() { |
| 51 var range = new tr.b.Range(); | 51 var range = new tr.b.math.Range(); |
| 52 this.addBoundsToRange(range); | 52 this.addBoundsToRange(range); |
| 53 return range; | 53 return range; |
| 54 }, | 54 }, |
| 55 | 55 |
| 56 // Empty by default. Lazily initialized on an instance in | 56 // Empty by default. Lazily initialized on an instance in |
| 57 // addAssociatedAlert(). See #1930. | 57 // addAssociatedAlert(). See #1930. |
| 58 associatedAlerts: IMMUTABLE_EMPTY_SET, | 58 associatedAlerts: IMMUTABLE_EMPTY_SET, |
| 59 | 59 |
| 60 addAssociatedAlert: function(alert) { | 60 addAssociatedAlert: function(alert) { |
| 61 if (this.associatedAlerts === IMMUTABLE_EMPTY_SET) | 61 if (this.associatedAlerts === IMMUTABLE_EMPTY_SET) |
| 62 this.associatedAlerts = new tr.model.EventSet(); | 62 this.associatedAlerts = new tr.model.EventSet(); |
| 63 this.associatedAlerts.push(alert); | 63 this.associatedAlerts.push(alert); |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 // Adds the range of timestamps for this event to the specified range. | 66 // Adds the range of timestamps for this event to the specified range. |
| 67 // If this is not overridden in subclass, it means that type of event | 67 // If this is not overridden in subclass, it means that type of event |
| 68 // doesn't have timestamps. | 68 // doesn't have timestamps. |
| 69 addBoundsToRange: function(range) {} | 69 addBoundsToRange: function(range) {} |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 return { | 72 return { |
| 73 Event, | 73 Event, |
| 74 }; | 74 }; |
| 75 }); | 75 }); |
| 76 </script> | 76 </script> |
| OLD | NEW |