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 urllib2 | 5 import urllib2 |
6 import httplib | 6 import httplib |
7 import socket | 7 import socket |
8 import json | 8 import json |
9 import re | 9 import re |
10 import sys | 10 import sys |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 return True | 131 return True |
132 | 132 |
133 def StartTracing(self): | 133 def StartTracing(self): |
134 if self._tracing_backend is None: | 134 if self._tracing_backend is None: |
135 self._tracing_backend = tracing_backend.TracingBackend(self._port) | 135 self._tracing_backend = tracing_backend.TracingBackend(self._port) |
136 self._tracing_backend.BeginTracing() | 136 self._tracing_backend.BeginTracing() |
137 | 137 |
138 def StopTracing(self): | 138 def StopTracing(self): |
139 self._tracing_backend.EndTracing() | 139 self._tracing_backend.EndTracing() |
140 | 140 |
141 def GetTrace(self): | 141 def GetTraceResultAndReset(self): |
142 return self._tracing_backend.GetTraceAndReset() | 142 return self._tracing_backend.GetTraceAndReset() |
143 | 143 |
144 def GetRemotePort(self, _): | 144 def GetRemotePort(self, _): |
145 return util.GetAvailableLocalPort() | 145 return util.GetAvailableLocalPort() |
146 | 146 |
147 def Close(self): | 147 def Close(self): |
148 if self._tracing_backend: | 148 if self._tracing_backend: |
149 self._tracing_backend.Close() | 149 self._tracing_backend.Close() |
150 self._tracing_backend = None | 150 self._tracing_backend = None |
151 | 151 |
152 def CreateForwarder(self, *port_pairs): | 152 def CreateForwarder(self, *port_pairs): |
153 raise NotImplementedError() | 153 raise NotImplementedError() |
154 | 154 |
155 def IsBrowserRunning(self): | 155 def IsBrowserRunning(self): |
156 raise NotImplementedError() | 156 raise NotImplementedError() |
157 | 157 |
158 def GetStandardOutput(self): | 158 def GetStandardOutput(self): |
159 raise NotImplementedError() | 159 raise NotImplementedError() |
OLD | NEW |