| 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 * @interface | 8 * @interface |
| 9 */ | 9 */ |
| 10 WebInspector.TracingManagerClient = function() | 10 WebInspector.TracingManagerClient = function() |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 this._eventsRetrieved = 0; | 104 this._eventsRetrieved = 0; |
| 105 this._activeClient.tracingComplete(); | 105 this._activeClient.tracingComplete(); |
| 106 this._activeClient = null; | 106 this._activeClient = null; |
| 107 this._finishing = false; | 107 this._finishing = false; |
| 108 }, | 108 }, |
| 109 | 109 |
| 110 /** | 110 /** |
| 111 * @param {!WebInspector.TracingManagerClient} client | 111 * @param {!WebInspector.TracingManagerClient} client |
| 112 * @param {string} categoryFilter | 112 * @param {string} categoryFilter |
| 113 * @param {string} options | 113 * @param {string} options |
| 114 * @param {string=} reloadingBanner |
| 114 * @param {function(?string)=} callback | 115 * @param {function(?string)=} callback |
| 115 */ | 116 */ |
| 116 start: function(client, categoryFilter, options, callback) | 117 start: function(client, categoryFilter, options, reloadingBanner, callback) |
| 117 { | 118 { |
| 118 if (this._activeClient) | 119 if (this._activeClient) |
| 119 throw new Error("Tracing is already started"); | 120 throw new Error("Tracing is already started"); |
| 120 var bufferUsageReportingIntervalMs = 500; | 121 var bufferUsageReportingIntervalMs = 500; |
| 121 this._activeClient = client; | 122 this._activeClient = client; |
| 122 this._target.tracingAgent().start(categoryFilter, options, bufferUsageRe
portingIntervalMs, WebInspector.TracingManager.TransferMode.ReportEvents, callba
ck); | 123 this._target.tracingAgent().start(categoryFilter, options, bufferUsageRe
portingIntervalMs, WebInspector.TracingManager.TransferMode.ReportEvents, undefi
ned, reloadingBanner, callback); |
| 123 this._activeClient.tracingStarted(); | 124 this._activeClient.tracingStarted(); |
| 124 }, | 125 }, |
| 125 | 126 |
| 126 stop: function() | 127 stop: function() |
| 127 { | 128 { |
| 128 if (!this._activeClient) | 129 if (!this._activeClient) |
| 129 throw new Error("Tracing is not started"); | 130 throw new Error("Tracing is not started"); |
| 130 if (this._finishing) | 131 if (this._finishing) |
| 131 throw new Error("Tracing is already being stopped"); | 132 throw new Error("Tracing is already being stopped"); |
| 132 this._finishing = true; | 133 this._finishing = true; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 }, | 167 }, |
| 167 | 168 |
| 168 /** | 169 /** |
| 169 * @override | 170 * @override |
| 170 */ | 171 */ |
| 171 tracingComplete: function() | 172 tracingComplete: function() |
| 172 { | 173 { |
| 173 this._tracingManager._tracingComplete(); | 174 this._tracingManager._tracingComplete(); |
| 174 } | 175 } |
| 175 } | 176 } |
| OLD | NEW |