OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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/ui/base/draw_helpers.html"> | 8 <link rel="import" href="/tracing/ui/base/draw_helpers.html"> |
9 <link rel="import" href="/tracing/ui/tracks/process_memory_dump_track.html"> | 9 <link rel="import" href="/tracing/ui/tracks/process_memory_dump_track.html"> |
10 <link rel="import" href="/tracing/ui/tracks/process_track_base.html"> | 10 <link rel="import" href="/tracing/ui/tracks/process_track_base.html"> |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Polymer.dom(this).appendChild(pmdt); | 120 Polymer.dom(this).appendChild(pmdt); |
121 } | 121 } |
122 }, | 122 }, |
123 | 123 |
124 addIntersectingEventsInRangeToSelectionInWorldSpace: function( | 124 addIntersectingEventsInRangeToSelectionInWorldSpace: function( |
125 loWX, hiWX, viewPixWidthWorld, selection) { | 125 loWX, hiWX, viewPixWidthWorld, selection) { |
126 function onPickHit(instantEvent) { | 126 function onPickHit(instantEvent) { |
127 selection.push(instantEvent); | 127 selection.push(instantEvent); |
128 } | 128 } |
129 var instantEventWidth = 2 * viewPixWidthWorld; | 129 var instantEventWidth = 2 * viewPixWidthWorld; |
130 tr.b.iterateOverIntersectingIntervals(this.processBase.instantEvents, | 130 tr.b.math.iterateOverIntersectingIntervals(this.processBase.instantEvents, |
131 function(x) { return x.start; }, | 131 function(x) { return x.start; }, |
132 function(x) { return x.duration + instantEventWidth; }, | 132 function(x) { return x.duration + instantEventWidth; }, |
133 loWX, hiWX, | 133 loWX, hiWX, |
134 onPickHit.bind(this)); | 134 onPickHit.bind(this)); |
135 | 135 |
136 tr.ui.tracks.ContainerTrack.prototype. | 136 tr.ui.tracks.ContainerTrack.prototype. |
137 addIntersectingEventsInRangeToSelectionInWorldSpace. | 137 addIntersectingEventsInRangeToSelectionInWorldSpace. |
138 apply(this, arguments); | 138 apply(this, arguments); |
139 }, | 139 }, |
140 | 140 |
141 addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY, | 141 addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY, |
142 selection) { | 142 selection) { |
143 this.addClosestInstantEventToSelection(this.processBase.instantEvents, | 143 this.addClosestInstantEventToSelection(this.processBase.instantEvents, |
144 worldX, worldMaxDist, selection); | 144 worldX, worldMaxDist, selection); |
145 tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection. | 145 tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection. |
146 apply(this, arguments); | 146 apply(this, arguments); |
147 } | 147 } |
148 }; | 148 }; |
149 | 149 |
150 return { | 150 return { |
151 ProcessTrack, | 151 ProcessTrack, |
152 }; | 152 }; |
153 }); | 153 }); |
154 </script> | 154 </script> |
OLD | NEW |