| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 """Configuration for the shell abstraction. | 5 """Configuration for the shell abstraction. |
| 6 | 6 |
| 7 This module declares ShellConfig and knows how to compute it from command-line | 7 This module declares ShellConfig and knows how to compute it from command-line |
| 8 arguments, applying any default paths inferred from the checkout, configuration | 8 arguments, applying any default paths inferred from the checkout, configuration |
| 9 file, etc. | 9 file, etc. |
| 10 """ | 10 """ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 self.map_url_list = [] | 29 self.map_url_list = [] |
| 30 self.map_origin_list = [] | 30 self.map_origin_list = [] |
| 31 self.dev_servers = [] | 31 self.dev_servers = [] |
| 32 self.content_handlers = dict() | 32 self.content_handlers = dict() |
| 33 self.verbose = None | 33 self.verbose = None |
| 34 | 34 |
| 35 # Android-only. | 35 # Android-only. |
| 36 self.adb_path = None | 36 self.adb_path = None |
| 37 self.target_device = None | 37 self.target_device = None |
| 38 self.logcat_tags = None | 38 self.logcat_tags = None |
| 39 self.require_root = False |
| 39 | 40 |
| 40 # Desktop-only. | 41 # Desktop-only. |
| 41 self.use_osmesa = None | 42 self.use_osmesa = None |
| 42 | 43 |
| 43 | 44 |
| 44 class DevServerConfig(object): | 45 class DevServerConfig(object): |
| 45 """Configuration for a development server running on a host and available to | 46 """Configuration for a development server running on a host and available to |
| 46 the shell. | 47 the shell. |
| 47 """ | 48 """ |
| 48 def __init__(self): | 49 def __init__(self): |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 203 |
| 203 if 'content_handlers' in config: | 204 if 'content_handlers' in config: |
| 204 try: | 205 try: |
| 205 for (mime_type, | 206 for (mime_type, |
| 206 content_handler_url) in config['content_handlers'].iteritems(): | 207 content_handler_url) in config['content_handlers'].iteritems(): |
| 207 shell_config.content_handlers[mime_type] = content_handler_url | 208 shell_config.content_handlers[mime_type] = content_handler_url |
| 208 except (ValueError, KeyError): | 209 except (ValueError, KeyError): |
| 209 raise ShellConfigurationException('Failed to parse content_handlers in ' | 210 raise ShellConfigurationException('Failed to parse content_handlers in ' |
| 210 'the config file.') | 211 'the config file.') |
| 211 return shell_config | 212 return shell_config |
| OLD | NEW |