Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: build/android/pylib/screenshot.py

Issue 333933003: [Android] Switch to DeviceUtils version of RunShellCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/pylib/ports.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 os 5 import os
6 import tempfile 6 import tempfile
7 7
8 from pylib import cmd_helper 8 from pylib import cmd_helper
9 9
10 # TODO(jbudorick) Remove once telemetry gets switched over. 10 # TODO(jbudorick) Remove once telemetry gets switched over.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if self._is_started: 69 if self._is_started:
70 break 70 break
71 return self._is_started 71 return self._is_started
72 72
73 def Stop(self): 73 def Stop(self):
74 """Stop recording video.""" 74 """Stop recording video."""
75 os.remove(self._recorder_stdout) 75 os.remove(self._recorder_stdout)
76 self._is_started = False 76 self._is_started = False
77 if not self._recorder or not self._recorder_pids: 77 if not self._recorder or not self._recorder_pids:
78 return 78 return
79 self._device.old_interface.RunShellCommand( 79 self._device.RunShellCommand(
80 'kill -SIGINT ' + ' '.join(self._recorder_pids)) 80 'kill -SIGINT ' + ' '.join(self._recorder_pids))
81 self._recorder.wait() 81 self._recorder.wait()
82 82
83 def Pull(self): 83 def Pull(self):
84 """Pull resulting video file from the device. 84 """Pull resulting video file from the device.
85 85
86 Returns: 86 Returns:
87 Output video file name on the host. 87 Output video file name on the host.
88 """ 88 """
89 self._device.old_interface.PullFileFromDevice( 89 self._device.old_interface.PullFileFromDevice(
90 self._device_file, self._host_file) 90 self._device_file, self._host_file)
91 self._device.old_interface.RunShellCommand('rm -f "%s"' % self._device_file) 91 self._device.RunShellCommand('rm -f "%s"' % self._device_file)
92 return self._host_file 92 return self._host_file
OLDNEW
« no previous file with comments | « build/android/pylib/ports.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698