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/importer/importer.html"> | 8 <link rel="import" href="/tracing/importer/importer.html"> |
9 <link rel="import" href="/tracing/importer/simple_line_reader.html"> | 9 <link rel="import" href="/tracing/importer/simple_line_reader.html"> |
10 <link rel="import" href="/tracing/model/activity.html"> | 10 <link rel="import" href="/tracing/model/activity.html"> |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 handleDestroyActivity: function(ts, activityName) { | 189 handleDestroyActivity: function(ts, activityName) { |
190 this.deleteActivity(activityName); | 190 this.deleteActivity(activityName); |
191 }, | 191 }, |
192 | 192 |
193 addActivityToProcess: function(activity) { | 193 addActivityToProcess: function(activity) { |
194 if (activity.pid === undefined) | 194 if (activity.pid === undefined) |
195 return; | 195 return; |
196 var process = this.model_.getOrCreateProcess(activity.pid); | 196 var process = this.model_.getOrCreateProcess(activity.pid); |
197 // The range of the activity is the time from resume to time | 197 // The range of the activity is the time from resume to time |
198 // of pause; limit the start time to the beginning of the model | 198 // of pause; limit the start time to the beginning of the model |
199 var range = tr.b.Range.fromExplicitRange( | 199 var range = tr.b.math.Range.fromExplicitRange( |
200 Math.max(this.model_.bounds.min, activity.lastResumeTs), | 200 Math.max(this.model_.bounds.min, activity.lastResumeTs), |
201 activity.lastPauseTs); | 201 activity.lastPauseTs); |
202 var newActivity = new tr.model.Activity(activity.name, | 202 var newActivity = new tr.model.Activity(activity.name, |
203 'Android Activity', range, | 203 'Android Activity', range, |
204 {created: activity.createdTs, | 204 {created: activity.createdTs, |
205 procstart: activity.procStartTs, | 205 procstart: activity.procStartTs, |
206 lastfocus: activity.lastFocusedTs}); | 206 lastfocus: activity.lastFocusedTs}); |
207 process.activities.push(newActivity); | 207 process.activities.push(newActivity); |
208 }, | 208 }, |
209 | 209 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 } | 312 } |
313 }; | 313 }; |
314 | 314 |
315 Importer.register(EventLogImporter); | 315 Importer.register(EventLogImporter); |
316 | 316 |
317 return { | 317 return { |
318 EventLogImporter, | 318 EventLogImporter, |
319 }; | 319 }; |
320 }); | 320 }); |
321 </script> | 321 </script> |
OLD | NEW |