| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 atexit | 5 import atexit |
| 6 import itertools | 6 import itertools |
| 7 import json | 7 import json |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import os.path | 10 import os.path |
| 11 import random | 11 import random |
| 12 import subprocess | 12 import subprocess |
| 13 import sys | 13 import sys |
| 14 import threading | 14 import threading |
| 15 import time | 15 import time |
| 16 import urlparse | 16 import urlparse |
| 17 | 17 |
| 18 from pylib.http_server import StartHttpServer | 18 from devtoolslib.http_server import StartHttpServer |
| 19 from pylib.shell import Shell | 19 from devtoolslib.shell import Shell |
| 20 | 20 |
| 21 | 21 |
| 22 # Tags used by the mojo shell application logs. | 22 # Tags used by the mojo shell application logs. |
| 23 LOGCAT_TAGS = [ | 23 LOGCAT_TAGS = [ |
| 24 'AndroidHandler', | 24 'AndroidHandler', |
| 25 'MojoFileHelper', | 25 'MojoFileHelper', |
| 26 'MojoMain', | 26 'MojoMain', |
| 27 'MojoShellActivity', | 27 'MojoShellActivity', |
| 28 'MojoShellApplication', | 28 'MojoShellApplication', |
| 29 'chromium', | 29 'chromium', |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 Returns: | 324 Returns: |
| 325 The process responsible for reading the logs. | 325 The process responsible for reading the logs. |
| 326 """ | 326 """ |
| 327 logcat = subprocess.Popen(self._CreateADBCommand([ | 327 logcat = subprocess.Popen(self._CreateADBCommand([ |
| 328 'logcat', | 328 'logcat', |
| 329 '-s', | 329 '-s', |
| 330 ' '.join(LOGCAT_TAGS)]), | 330 ' '.join(LOGCAT_TAGS)]), |
| 331 stdout=sys.stdout) | 331 stdout=sys.stdout) |
| 332 atexit.register(_ExitIfNeeded, logcat) | 332 atexit.register(_ExitIfNeeded, logcat) |
| 333 return logcat | 333 return logcat |
| OLD | NEW |