OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /** | 7 /** |
8 * @constructor | 8 * @constructor |
9 * @extends {WebInspector.SDKObject} | 9 * @extends {WebInspector.SDKObject} |
10 */ | 10 */ |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 return this._devtoolsWorkerMetadataEvents; | 94 return this._devtoolsWorkerMetadataEvents; |
95 }, | 95 }, |
96 | 96 |
97 /** | 97 /** |
98 * @param {string} categoryFilter | 98 * @param {string} categoryFilter |
99 * @param {string} options | 99 * @param {string} options |
100 * @param {function(?string)=} callback | 100 * @param {function(?string)=} callback |
101 */ | 101 */ |
102 start: function(categoryFilter, options, callback) | 102 start: function(categoryFilter, options, callback) |
103 { | 103 { |
104 this.target().profilingLock.acquire(); | 104 WebInspector.profilingLock.acquire(); |
105 this.reset(); | 105 this.reset(); |
106 var bufferUsageReportingIntervalMs = 500; | 106 var bufferUsageReportingIntervalMs = 500; |
107 TracingAgent.start(categoryFilter, options, bufferUsageReportingInterval
Ms, callback); | 107 TracingAgent.start(categoryFilter, options, bufferUsageReportingInterval
Ms, callback); |
108 this._active = true; | 108 this._active = true; |
109 }, | 109 }, |
110 | 110 |
111 stop: function() | 111 stop: function() |
112 { | 112 { |
113 if (!this._active) | 113 if (!this._active) |
114 return; | 114 return; |
115 TracingAgent.end(this._onStop.bind(this)); | 115 TracingAgent.end(this._onStop.bind(this)); |
116 this.target().profilingLock.release(); | 116 WebInspector.profilingLock.release(); |
117 }, | 117 }, |
118 | 118 |
119 /** | 119 /** |
120 * @return {?string} | 120 * @return {?string} |
121 */ | 121 */ |
122 sessionId: function() | 122 sessionId: function() |
123 { | 123 { |
124 return this._sessionId; | 124 return this._sessionId; |
125 }, | 125 }, |
126 | 126 |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 started: function(consoleTimeline, sessionId) | 676 started: function(consoleTimeline, sessionId) |
677 { | 677 { |
678 this._tracingModel._tracingStarted(sessionId); | 678 this._tracingModel._tracingStarted(sessionId); |
679 }, | 679 }, |
680 | 680 |
681 stopped: function() | 681 stopped: function() |
682 { | 682 { |
683 this._tracingModel._onStop(); | 683 this._tracingModel._onStop(); |
684 } | 684 } |
685 } | 685 } |
OLD | NEW |