| Index: tools/telemetry/telemetry/core/platform/__init__.py
|
| diff --git a/tools/telemetry/telemetry/core/platform/__init__.py b/tools/telemetry/telemetry/core/platform/__init__.py
|
| index 1f77028115aa46c6b82b776f908f1b417ed80333..196c7f5ca0b181734c64b15806ff4de5cab8067b 100644
|
| --- a/tools/telemetry/telemetry/core/platform/__init__.py
|
| +++ b/tools/telemetry/telemetry/core/platform/__init__.py
|
| @@ -326,3 +326,24 @@ class Platform(object):
|
| }
|
| """
|
| return self._platform_backend.StopMonitoringPower()
|
| +
|
| + def IsCooperativeShutdownSupported(self):
|
| + """Indicates whether CooperativelyShutdown, below, is supported.
|
| + It is not necessary to implement it on all platforms."""
|
| + return self._platform_backend.IsCooperativeShutdownSupported()
|
| +
|
| + def CooperativelyShutdown(self, proc, app_name):
|
| + """Cooperatively shut down the given process from subprocess.Popen.
|
| +
|
| + Currently this is only implemented on Windows. See
|
| + crbug.com/424024 for background on why it was added.
|
| +
|
| + Args:
|
| + proc: a process object returned from subprocess.Popen.
|
| + app_name: on Windows, is the prefix of the application's window
|
| + class name that should be searched for. This helps ensure
|
| + that only the application's windows are closed.
|
| +
|
| + Returns True if it is believed the attempt succeeded.
|
| + """
|
| + return self._platform_backend.CooperativelyShutdown(proc, app_name)
|
|
|