OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 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/base.html"> | 8 <link rel="import" href="/tracing/base/base.html"> |
9 <link rel="import" href="/tracing/base/guid.html"> | 9 <link rel="import" href="/tracing/base/guid.html"> |
10 <link rel="import" href="/tracing/base/range.html"> | 10 <link rel="import" href="/tracing/base/math/range.html"> |
11 | 11 |
12 <script> | 12 <script> |
13 'use strict'; | 13 'use strict'; |
14 | 14 |
15 tr.exportTo('tr.model', function() { | 15 tr.exportTo('tr.model', function() { |
16 /** | 16 /** |
17 * EventContainer is a base class for any class in the trace model that | 17 * EventContainer is a base class for any class in the trace model that |
18 * contains child events or child EventContainers. | 18 * contains child events or child EventContainers. |
19 * | 19 * |
20 * For all EventContainers, updateBounds() must be called after modifying the | 20 * For all EventContainers, updateBounds() must be called after modifying the |
21 * container's events if an up-to-date bounds is expected. | 21 * container's events if an up-to-date bounds is expected. |
22 * | 22 * |
23 * @constructor | 23 * @constructor |
24 */ | 24 */ |
25 function EventContainer() { | 25 function EventContainer() { |
26 this.guid_ = tr.b.GUID.allocateSimple(); | 26 this.guid_ = tr.b.GUID.allocateSimple(); |
27 this.important = true; | 27 this.important = true; |
28 this.bounds_ = new tr.b.Range(); | 28 this.bounds_ = new tr.b.math.Range(); |
29 } | 29 } |
30 | 30 |
31 EventContainer.prototype = { | 31 EventContainer.prototype = { |
32 get guid() { | 32 get guid() { |
33 return this.guid_; | 33 return this.guid_; |
34 }, | 34 }, |
35 | 35 |
36 /** | 36 /** |
37 * @return {String} A stable and unique identifier that describes this | 37 * @return {String} A stable and unique identifier that describes this |
38 * container's position in the event tree relative to the root. If an event | 38 * container's position in the event tree relative to the root. If an event |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 findTopmostSlicesNamed: function* (name) { | 131 findTopmostSlicesNamed: function* (name) { |
132 yield* this.findTopmostSlices(e => e.title === name); | 132 yield* this.findTopmostSlices(e => e.title === name); |
133 } | 133 } |
134 }; | 134 }; |
135 | 135 |
136 return { | 136 return { |
137 EventContainer, | 137 EventContainer, |
138 }; | 138 }; |
139 }); | 139 }); |
140 </script> | 140 </script> |
OLD | NEW |