OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @extends {WebInspector.TargetAwareObject} | 33 * @extends {WebInspector.TargetAwareObject} |
34 * @param {!WebInspector.Target} target | 34 * @param {!WebInspector.Target} target |
35 */ | 35 */ |
36 WebInspector.TimelineManager = function(target) | 36 WebInspector.TimelineManager = function(target) |
37 { | 37 { |
38 WebInspector.TargetAwareObject.call(this, target); | 38 WebInspector.TargetAwareObject.call(this, target); |
39 this._dispatcher = new WebInspector.TimelineDispatcher(this); | 39 this._dispatcher = new WebInspector.TimelineDispatcher(this); |
40 this._enablementCount = 0; | 40 this._enablementCount = 0; |
41 TimelineAgent.enable(WebInspector.experimentsSettings.timelineTracingMode.is
Enabled() ? WebInspector.TimelineManager.defaultTracingCategories : ""); | 41 TimelineAgent.enable(); |
42 } | 42 } |
43 | 43 |
44 WebInspector.TimelineManager.EventTypes = { | 44 WebInspector.TimelineManager.EventTypes = { |
45 TimelineStarted: "TimelineStarted", | 45 TimelineStarted: "TimelineStarted", |
46 TimelineStopped: "TimelineStopped", | 46 TimelineStopped: "TimelineStopped", |
47 TimelineEventRecorded: "TimelineEventRecorded", | 47 TimelineEventRecorded: "TimelineEventRecorded", |
48 TimelineProgress: "TimelineProgress" | 48 TimelineProgress: "TimelineProgress" |
49 } | 49 } |
50 | 50 |
51 WebInspector.TimelineManager.defaultTracingCategories = "*,disabled-by-default-c
c.debug,disabled-by-default-devtools.timeline"; | |
52 | |
53 WebInspector.TimelineManager.prototype = { | 51 WebInspector.TimelineManager.prototype = { |
54 /** | 52 /** |
55 * @return {boolean} | 53 * @return {boolean} |
56 */ | 54 */ |
57 isStarted: function() | 55 isStarted: function() |
58 { | 56 { |
59 return this._dispatcher.isStarted(); | 57 return this._dispatcher.isStarted(); |
60 }, | 58 }, |
61 | 59 |
62 /** | 60 /** |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 progress: function(count) | 208 progress: function(count) |
211 { | 209 { |
212 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineProgress, count); | 210 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineProgress, count); |
213 } | 211 } |
214 } | 212 } |
215 | 213 |
216 /** | 214 /** |
217 * @type {!WebInspector.TimelineManager} | 215 * @type {!WebInspector.TimelineManager} |
218 */ | 216 */ |
219 WebInspector.timelineManager; | 217 WebInspector.timelineManager; |
OLD | NEW |