| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 | 6 |
| 7 from telemetry.core import browser_credentials | 7 from telemetry.core import browser_credentials |
| 8 from telemetry.core import extension_dict | 8 from telemetry.core import extension_dict |
| 9 from telemetry.core import platform | 9 from telemetry.core import platform |
| 10 from telemetry.core import tab_list | 10 from telemetry.core import tab_list |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 self._active_profilers.append( | 206 self._active_profilers.append( |
| 207 profiler_class(self._browser_backend, self._platform_backend, | 207 profiler_class(self._browser_backend, self._platform_backend, |
| 208 base_output_file)) | 208 base_output_file)) |
| 209 | 209 |
| 210 def StopProfiling(self): | 210 def StopProfiling(self): |
| 211 """Stops all active profilers and saves their results.""" | 211 """Stops all active profilers and saves their results.""" |
| 212 for profiler in self._active_profilers: | 212 for profiler in self._active_profilers: |
| 213 profiler.CollectProfile() | 213 profiler.CollectProfile() |
| 214 self._active_profilers = [] | 214 self._active_profilers = [] |
| 215 | 215 |
| 216 def StartTracing(self, custom_categories=None): | 216 def StartTracing(self, custom_categories=None, timeout=10): |
| 217 return self._browser_backend.StartTracing(custom_categories) | 217 return self._browser_backend.StartTracing(custom_categories, timeout) |
| 218 | 218 |
| 219 def StopTracing(self): | 219 def StopTracing(self): |
| 220 return self._browser_backend.StopTracing() | 220 return self._browser_backend.StopTracing() |
| 221 | 221 |
| 222 def GetTraceResultAndReset(self): | 222 def GetTraceResultAndReset(self): |
| 223 """Returns the result of the trace, as TraceResult object.""" | 223 """Returns the result of the trace, as TraceResult object.""" |
| 224 return self._browser_backend.GetTraceResultAndReset() | 224 return self._browser_backend.GetTraceResultAndReset() |
| 225 | 225 |
| 226 def Close(self): | 226 def Close(self): |
| 227 """Closes this browser.""" | 227 """Closes this browser.""" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 use_record_mode, | 283 use_record_mode, |
| 284 append_to_existing_wpr, | 284 append_to_existing_wpr, |
| 285 self._browser_backend.WEBPAGEREPLAY_HOST, | 285 self._browser_backend.WEBPAGEREPLAY_HOST, |
| 286 self._browser_backend.webpagereplay_local_http_port, | 286 self._browser_backend.webpagereplay_local_http_port, |
| 287 self._browser_backend.webpagereplay_local_https_port, | 287 self._browser_backend.webpagereplay_local_https_port, |
| 288 self._browser_backend.webpagereplay_remote_http_port, | 288 self._browser_backend.webpagereplay_remote_http_port, |
| 289 self._browser_backend.webpagereplay_remote_https_port) | 289 self._browser_backend.webpagereplay_remote_https_port) |
| 290 | 290 |
| 291 def GetStandardOutput(self): | 291 def GetStandardOutput(self): |
| 292 return self._browser_backend.GetStandardOutput() | 292 return self._browser_backend.GetStandardOutput() |
| OLD | NEW |