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

Unified Diff: build/android/screenshot.py

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/valgrind_tools.py ('k') | build/android/surface_stats.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/screenshot.py
diff --git a/build/android/screenshot.py b/build/android/screenshot.py
index db39c5d35a6a86454222e63cbec44b9e897c5c30..4932e77213dd62ca32e520f3414e68be283cb4f9 100755
--- a/build/android/screenshot.py
+++ b/build/android/screenshot.py
@@ -13,21 +13,21 @@ import sys
from pylib import android_commands
from pylib import screenshot
-
+from pylib.device import device_utils
def _PrintMessage(heading, eol='\n'):
sys.stdout.write('%s%s' % (heading, eol))
sys.stdout.flush()
-def _CaptureScreenshot(adb, host_file):
- host_file = adb.TakeScreenshot(host_file)
+def _CaptureScreenshot(device, host_file):
+ host_file = device.old_interface.TakeScreenshot(host_file)
_PrintMessage('Screenshot written to %s' % os.path.abspath(host_file))
-def _CaptureVideo(adb, host_file, options):
+def _CaptureVideo(device, host_file, options):
size = tuple(map(int, options.size.split('x'))) if options.size else None
- recorder = screenshot.VideoRecorder(adb,
+ recorder = screenshot.VideoRecorder(device,
host_file,
megabits_per_second=options.bitrate,
size=size,
@@ -77,12 +77,12 @@ def main():
if len(args) > 1:
parser.error('Too many positional arguments.')
host_file = args[0] if args else options.file
- adb = android_commands.AndroidCommands(options.device)
+ device = device_utils.DeviceUtils(options.device)
if options.video:
- _CaptureVideo(adb, host_file, options)
+ _CaptureVideo(device, host_file, options)
else:
- _CaptureScreenshot(adb, host_file)
+ _CaptureScreenshot(device, host_file)
return 0
« no previous file with comments | « build/android/pylib/valgrind_tools.py ('k') | build/android/surface_stats.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698