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/range.html"> |
10 <link rel="import" href="/tracing/model/event_set.html"> | 10 <link rel="import" href="/tracing/model/event_set.html"> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 var range = new tr.b.Range(); | 51 var range = new tr.b.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 } |
63 this.associatedAlerts.push(alert); | 64 this.associatedAlerts.push(alert); |
64 }, | 65 }, |
65 | 66 |
66 // Adds the range of timestamps for this event to the specified range. | 67 // 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 | 68 // If this is not overridden in subclass, it means that type of event |
68 // doesn't have timestamps. | 69 // doesn't have timestamps. |
69 addBoundsToRange: function(range) {} | 70 addBoundsToRange: function(range) {} |
70 }; | 71 }; |
71 | 72 |
72 return { | 73 return { |
73 Event, | 74 Event, |
74 }; | 75 }; |
75 }); | 76 }); |
76 </script> | 77 </script> |
OLD | NEW |