1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # pylint: disable=W0613
8 # pylint: disable=W0212
10 def __new__(cls, friendly_name, sortable_name, *args, **kwargs):
11 version = str.__new__(cls, friendly_name)
12 version._sortable_name = sortable_name
15 def __lt__(self, other):
16 return self._sortable_name < other._sortable_name
18 def __gt__(self, other):
19 return self._sortable_name > other._sortable_name
21 def __le__(self, other):
22 return self._sortable_name <= other._sortable_name
24 def __ge__(self, other):
25 return self._sortable_name >= other._sortable_name
28 class PlatformBackend(object):
29 def IsRawDisplayFrameRateSupported(self):
32 def StartRawDisplayFrameRateMeasurement(self):
33 raise NotImplementedError()
35 def StopRawDisplayFrameRateMeasurement(self):
36 raise NotImplementedError()
38 def GetRawDisplayFrameRateMeasurements(self):
39 raise NotImplementedError()
41 def SetFullPerformanceModeEnabled(self, enabled):
44 def CanMonitorThermalThrottling(self):
47 def IsThermallyThrottled(self):
48 raise NotImplementedError()
50 def HasBeenThermallyThrottled(self):
51 raise NotImplementedError()
53 def GetSystemCommitCharge(self):
54 raise NotImplementedError()
56 def GetSystemTotalPhysicalMemory(self):
57 raise NotImplementedError()
59 def GetCpuStats(self, pid):
62 def GetCpuTimestamp(self):
65 def PurgeUnpinnedMemory(self):
68 def GetMemoryStats(self, pid):
71 def GetIOStats(self, pid):
74 def GetChildPids(self, pid):
75 raise NotImplementedError()
77 def GetCommandLine(self, pid):
78 raise NotImplementedError()
81 raise NotImplementedError()
83 def GetOSVersionName(self):
84 raise NotImplementedError()
86 def CanFlushIndividualFilesFromSystemCache(self):
87 raise NotImplementedError()
89 def FlushEntireSystemCache(self):
90 raise NotImplementedError()
92 def FlushSystemCacheForDirectory(self, directory, ignoring=None):
93 raise NotImplementedError()
95 def FlushDnsCache(self):
98 def LaunchApplication(
99 self, application, parameters=None, elevate_privilege=False):
100 raise NotImplementedError()
102 def IsApplicationRunning(self, application):
103 raise NotImplementedError()
105 def CanLaunchApplication(self, application):
108 def InstallApplication(self, application):
109 raise NotImplementedError()
111 def CanCaptureVideo(self):
114 def StartVideoCapture(self, min_bitrate_mbps):
115 raise NotImplementedError()
118 def is_video_capture_running(self):
121 def StopVideoCapture(self):
122 raise NotImplementedError()
124 def CanMonitorPower(self):
127 def StartMonitoringPower(self, browser):
128 raise NotImplementedError()
130 def StopMonitoringPower(self):
131 raise NotImplementedError()