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 | 5 |
6 # pylint: disable=W0201 | 6 # pylint: disable=W0201 |
7 | 7 |
8 | 8 |
9 """Default flavor utils class, used for desktop builders.""" | 9 """Default flavor utils class, used for desktop builders.""" |
10 | 10 |
11 | 11 |
12 import json | 12 import json |
13 | 13 |
14 | 14 |
15 WIN_TOOLCHAIN_DIR = 't' | 15 WIN_TOOLCHAIN_DIR = 't' |
16 | 16 |
17 | 17 |
18 class DeviceDirs(object): | 18 class DeviceDirs(object): |
19 def __init__(self, | 19 def __init__(self, |
20 dm_dir, | 20 dm_dir, |
21 perf_data_dir, | 21 perf_data_dir, |
22 resource_dir, | 22 resource_dir, |
23 images_dir, | 23 images_dir, |
24 skp_dir, | 24 skp_dir, |
| 25 svg_dir, |
25 tmp_dir): | 26 tmp_dir): |
26 self._dm_dir = dm_dir | 27 self._dm_dir = dm_dir |
27 self._perf_data_dir = perf_data_dir | 28 self._perf_data_dir = perf_data_dir |
28 self._resource_dir = resource_dir | 29 self._resource_dir = resource_dir |
29 self._images_dir = images_dir | 30 self._images_dir = images_dir |
30 self._skp_dir = skp_dir | 31 self._skp_dir = skp_dir |
| 32 self._svg_dir = svg_dir |
31 self._tmp_dir = tmp_dir | 33 self._tmp_dir = tmp_dir |
32 | 34 |
33 @property | 35 @property |
34 def dm_dir(self): | 36 def dm_dir(self): |
35 """Where DM writes.""" | 37 """Where DM writes.""" |
36 return self._dm_dir | 38 return self._dm_dir |
37 | 39 |
38 @property | 40 @property |
39 def perf_data_dir(self): | 41 def perf_data_dir(self): |
40 return self._perf_data_dir | 42 return self._perf_data_dir |
41 | 43 |
42 @property | 44 @property |
43 def resource_dir(self): | 45 def resource_dir(self): |
44 return self._resource_dir | 46 return self._resource_dir |
45 | 47 |
46 @property | 48 @property |
47 def images_dir(self): | 49 def images_dir(self): |
48 return self._images_dir | 50 return self._images_dir |
49 | 51 |
50 @property | 52 @property |
51 def skp_dir(self): | 53 def skp_dir(self): |
52 """Holds SKP files that are consumed by RenderSKPs and BenchPictures.""" | 54 """Holds SKP files that are consumed by RenderSKPs and BenchPictures.""" |
53 return self._skp_dir | 55 return self._skp_dir |
54 | 56 |
55 @property | 57 @property |
| 58 def svg_dir(self): |
| 59 return self._svg_dir |
| 60 |
| 61 @property |
56 def tmp_dir(self): | 62 def tmp_dir(self): |
57 return self._tmp_dir | 63 return self._tmp_dir |
58 | 64 |
59 | 65 |
60 class DefaultFlavorUtils(object): | 66 class DefaultFlavorUtils(object): |
61 """Utilities to be used by build steps. | 67 """Utilities to be used by build steps. |
62 | 68 |
63 The methods in this class define how certain high-level functions should | 69 The methods in this class define how certain high-level functions should |
64 work. Each build step flavor should correspond to a subclass of | 70 work. Each build step flavor should correspond to a subclass of |
65 DefaultFlavorUtils which may override any of these functions as appropriate | 71 DefaultFlavorUtils which may override any of these functions as appropriate |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 self.m.path.basename(path), path, infra_step=True) | 219 self.m.path.basename(path), path, infra_step=True) |
214 | 220 |
215 def install(self): | 221 def install(self): |
216 """Run device-specific installation steps.""" | 222 """Run device-specific installation steps.""" |
217 self.device_dirs = DeviceDirs( | 223 self.device_dirs = DeviceDirs( |
218 dm_dir=self.m.vars.dm_dir, | 224 dm_dir=self.m.vars.dm_dir, |
219 perf_data_dir=self.m.vars.perf_data_dir, | 225 perf_data_dir=self.m.vars.perf_data_dir, |
220 resource_dir=self.m.vars.resource_dir, | 226 resource_dir=self.m.vars.resource_dir, |
221 images_dir=self.m.vars.images_dir, | 227 images_dir=self.m.vars.images_dir, |
222 skp_dir=self.m.vars.local_skp_dir, | 228 skp_dir=self.m.vars.local_skp_dir, |
| 229 svg_dir=self.m.vars.local_svg_dir, |
223 tmp_dir=self.m.vars.tmp_dir) | 230 tmp_dir=self.m.vars.tmp_dir) |
224 | 231 |
225 def cleanup_steps(self): | 232 def cleanup_steps(self): |
226 """Run any device-specific cleanup steps.""" | 233 """Run any device-specific cleanup steps.""" |
227 pass | 234 pass |
OLD | NEW |