| 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 25 matching lines...) Expand all Loading... |
| 36 { | 36 { |
| 37 WebInspector.Object.call(this); | 37 WebInspector.Object.call(this); |
| 38 this._dispatcher = new WebInspector.TimelineDispatcher(this); | 38 this._dispatcher = new WebInspector.TimelineDispatcher(this); |
| 39 this._enablementCount = 0; | 39 this._enablementCount = 0; |
| 40 TimelineAgent.enable(); | 40 TimelineAgent.enable(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 WebInspector.TimelineManager.EventTypes = { | 43 WebInspector.TimelineManager.EventTypes = { |
| 44 TimelineStarted: "TimelineStarted", | 44 TimelineStarted: "TimelineStarted", |
| 45 TimelineStopped: "TimelineStopped", | 45 TimelineStopped: "TimelineStopped", |
| 46 TimelineEventRecorded: "TimelineEventRecorded" | 46 TimelineEventRecorded: "TimelineEventRecorded", |
| 47 TimelineProgress: "TimelineProgress" |
| 47 } | 48 } |
| 48 | 49 |
| 49 WebInspector.TimelineManager.prototype = { | 50 WebInspector.TimelineManager.prototype = { |
| 50 /** | 51 /** |
| 51 * @return {boolean} | 52 * @return {boolean} |
| 52 */ | 53 */ |
| 53 isStarted: function() | 54 isStarted: function() |
| 54 { | 55 { |
| 55 return this._dispatcher.isStarted(); | 56 return this._dispatcher.isStarted(); |
| 56 }, | 57 }, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineStarted, consoleTimeline); | 132 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineStarted, consoleTimeline); |
| 132 }, | 133 }, |
| 133 | 134 |
| 134 /** | 135 /** |
| 135 * @param {boolean=} consoleTimeline | 136 * @param {boolean=} consoleTimeline |
| 136 */ | 137 */ |
| 137 stopped: function(consoleTimeline) | 138 stopped: function(consoleTimeline) |
| 138 { | 139 { |
| 139 this._started = false; | 140 this._started = false; |
| 140 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineStopped, consoleTimeline); | 141 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineStopped, consoleTimeline); |
| 142 }, |
| 143 |
| 144 progress: function(count) |
| 145 { |
| 146 this._manager.dispatchEventToListeners(WebInspector.TimelineManager.Even
tTypes.TimelineProgress, count); |
| 141 } | 147 } |
| 142 } | 148 } |
| 143 | 149 |
| 144 /** | 150 /** |
| 145 * @type {!WebInspector.TimelineManager} | 151 * @type {!WebInspector.TimelineManager} |
| 146 */ | 152 */ |
| 147 WebInspector.timelineManager; | 153 WebInspector.timelineManager; |
| OLD | NEW |