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

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

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/valgrind_tools.py ('k') | build/android/test_runner.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Takes a screenshot or a screen video capture from an Android device.""" 7 """Takes a screenshot or a screen video capture from an Android device."""
8 8
9 import logging 9 import logging
10 import optparse 10 import optparse
11 import os 11 import os
12 import sys 12 import sys
13 13
14 from devil.android import device_blacklist
15 from devil.android import device_errors
16 from devil.android import device_utils
14 from pylib import screenshot 17 from pylib import screenshot
15 from pylib.device import device_blacklist
16 from pylib.device import device_errors
17 from pylib.device import device_utils
18 18
19 def _PrintMessage(heading, eol='\n'): 19 def _PrintMessage(heading, eol='\n'):
20 sys.stdout.write('%s%s' % (heading, eol)) 20 sys.stdout.write('%s%s' % (heading, eol))
21 sys.stdout.flush() 21 sys.stdout.flush()
22 22
23 23
24 def _CaptureScreenshot(device, host_file): 24 def _CaptureScreenshot(device, host_file):
25 host_file = device.TakeScreenshot(host_file) 25 host_file = device.TakeScreenshot(host_file)
26 _PrintMessage('Screenshot written to %s' % os.path.abspath(host_file)) 26 _PrintMessage('Screenshot written to %s' % os.path.abspath(host_file))
27 27
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 if options.video: 97 if options.video:
98 _CaptureVideo(device, host_file, options) 98 _CaptureVideo(device, host_file, options)
99 else: 99 else:
100 _CaptureScreenshot(device, host_file) 100 _CaptureScreenshot(device, host_file)
101 return 0 101 return 0
102 102
103 103
104 if __name__ == '__main__': 104 if __name__ == '__main__':
105 sys.exit(main()) 105 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/valgrind_tools.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698