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 import weakref | 5 import weakref |
6 | 6 |
7 from battor import battor_wrapper | 7 from battor import battor_wrapper |
8 from telemetry.internal import forwarders | 8 from telemetry.internal import forwarders |
9 from telemetry.internal.forwarders import do_nothing_forwarder | 9 from telemetry.internal.forwarders import do_nothing_forwarder |
10 from telemetry.internal.platform import network_controller_backend | 10 from telemetry.internal.platform import network_controller_backend |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 assert browser not in self._running_browser_backends | 102 assert browser not in self._running_browser_backends |
103 self._running_browser_backends.add(browser_backend) | 103 self._running_browser_backends.add(browser_backend) |
104 | 104 |
105 def WillCloseBrowser(self, browser, browser_backend): | 105 def WillCloseBrowser(self, browser, browser_backend): |
106 is_last_browser = len(self._running_browser_backends) <= 1 | 106 is_last_browser = len(self._running_browser_backends) <= 1 |
107 if is_last_browser: | 107 if is_last_browser: |
108 self.SetFullPerformanceModeEnabled(False) | 108 self.SetFullPerformanceModeEnabled(False) |
109 | 109 |
110 self._running_browser_backends.discard(browser_backend) | 110 self._running_browser_backends.discard(browser_backend) |
111 | 111 |
112 def CreatePortForwarder(self, port_pair, use_remote_port_forwarding): | |
113 """Use forwarder_factory to create a port forwarder.""" | |
114 raise NotImplementedError() | |
115 | |
116 def IsDeviceRemote(self): | |
nednguyen
2017/07/21 14:30:00
s/IsDeviceRemote/IsRemoteDevice
| |
117 """Check if target browser is on remote device. | |
nednguyen
2017/07/21 14:30:00
The platform concept in Telemetry is agnostic abou
| |
118 | |
119 Returns True if device is on remote, i.e. android | |
120 device connected via adb or running a test with | |
121 remote option specifying the ip address of a cros device. | |
122 Return False for other platforms. | |
123 """ | |
124 return False | |
125 | |
112 def IsDisplayTracingSupported(self): | 126 def IsDisplayTracingSupported(self): |
113 return False | 127 return False |
114 | 128 |
115 def StartDisplayTracing(self): | 129 def StartDisplayTracing(self): |
116 """Start gathering a trace with frame timestamps close to physical | 130 """Start gathering a trace with frame timestamps close to physical |
117 display.""" | 131 display.""" |
118 raise NotImplementedError() | 132 raise NotImplementedError() |
119 | 133 |
120 def StopDisplayTracing(self): | 134 def StopDisplayTracing(self): |
121 """Stop gathering a trace with frame timestamps close to physical display. | 135 """Stop gathering a trace with frame timestamps close to physical display. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 Return: | 312 Return: |
299 Whether the path exists on the target platform. | 313 Whether the path exists on the target platform. |
300 """ | 314 """ |
301 raise NotImplementedError() | 315 raise NotImplementedError() |
302 | 316 |
303 def HasBattOrConnected(self): | 317 def HasBattOrConnected(self): |
304 return battor_wrapper.IsBattOrConnected(self.GetOSName()) | 318 return battor_wrapper.IsBattOrConnected(self.GetOSName()) |
305 | 319 |
306 def WaitForBatteryTemperature(self, temp): | 320 def WaitForBatteryTemperature(self, temp): |
307 pass | 321 pass |
OLD | NEW |