OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from telemetry.core import util | 5 from telemetry.core import util |
6 from telemetry.core import web_contents | 6 from telemetry.core import web_contents |
7 | 7 |
8 | 8 |
9 class ExtensionsNotSupportedException(Exception): | 9 class ExtensionsNotSupportedException(Exception): |
10 pass | 10 pass |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 def supports_system_info(self): | 61 def supports_system_info(self): |
62 return False | 62 return False |
63 | 63 |
64 def StartTracing(self, custom_categories=None, | 64 def StartTracing(self, custom_categories=None, |
65 timeout=web_contents.DEFAULT_WEB_CONTENTS_TIMEOUT): | 65 timeout=web_contents.DEFAULT_WEB_CONTENTS_TIMEOUT): |
66 raise NotImplementedError() | 66 raise NotImplementedError() |
67 | 67 |
68 def StopTracing(self): | 68 def StopTracing(self): |
69 raise NotImplementedError() | 69 raise NotImplementedError() |
70 | 70 |
| 71 def GetTraceResult(self): |
| 72 raise NotImplementedError() |
| 73 |
71 def GetTraceResultAndReset(self): | 74 def GetTraceResultAndReset(self): |
72 raise NotImplementedError() | 75 raise NotImplementedError() |
73 | 76 |
74 def GetRemotePort(self, _): | 77 def GetRemotePort(self, _): |
75 return util.GetAvailableLocalPort() | 78 return util.GetAvailableLocalPort() |
76 | 79 |
77 def Start(self): | 80 def Start(self): |
78 raise NotImplementedError() | 81 raise NotImplementedError() |
79 | 82 |
80 def CreateForwarder(self, *port_pairs): | 83 def CreateForwarder(self, *port_pairs): |
(...skipping 15 matching lines...) Expand all Loading... |
96 def __init__(self, *port_pairs): | 99 def __init__(self, *port_pairs): |
97 self._host_port = port_pairs[0].local_port | 100 self._host_port = port_pairs[0].local_port |
98 | 101 |
99 @property | 102 @property |
100 def url(self): | 103 def url(self): |
101 assert self._host_port | 104 assert self._host_port |
102 return 'http://127.0.0.1:%i' % self._host_port | 105 return 'http://127.0.0.1:%i' % self._host_port |
103 | 106 |
104 def Close(self): | 107 def Close(self): |
105 self._host_port = None | 108 self._host_port = None |
OLD | NEW |