OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 argparse | 5 import argparse |
6 import copy | 6 import copy |
7 from datetime import datetime | 7 from datetime import datetime |
8 from functools import partial | 8 from functools import partial |
9 import os | 9 import os |
10 | 10 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 'platforms': { | 182 'platforms': { |
183 list: { | 183 list: { |
184 'enum_map': { | 184 'enum_map': { |
185 'chromeos': 'Feature::CHROMEOS_PLATFORM', | 185 'chromeos': 'Feature::CHROMEOS_PLATFORM', |
186 'linux': 'Feature::LINUX_PLATFORM', | 186 'linux': 'Feature::LINUX_PLATFORM', |
187 'mac': 'Feature::MACOSX_PLATFORM', | 187 'mac': 'Feature::MACOSX_PLATFORM', |
188 'win': 'Feature::WIN_PLATFORM', | 188 'win': 'Feature::WIN_PLATFORM', |
189 } | 189 } |
190 } | 190 } |
191 }, | 191 }, |
| 192 'session_types': { |
| 193 list: { |
| 194 'enum_map': { |
| 195 'regular': 'FeatureSessionType::REGULAR', |
| 196 'kiosk': 'FeatureSessionType::KIOSK', |
| 197 } |
| 198 } |
| 199 }, |
192 'whitelist': { | 200 'whitelist': { |
193 list: {'subtype': unicode} | 201 list: {'subtype': unicode} |
194 }, | 202 }, |
195 }) | 203 }) |
196 | 204 |
197 FEATURE_CLASSES = ['APIFeature', 'BehaviorFeature', | 205 FEATURE_CLASSES = ['APIFeature', 'BehaviorFeature', |
198 'ManifestFeature', 'PermissionFeature'] | 206 'ManifestFeature', 'PermissionFeature'] |
199 | 207 |
200 def HasProperty(property_name, value): | 208 def HasProperty(property_name, value): |
201 return property_name in value | 209 return property_name in value |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 parser.add_argument('source_files', type=str, nargs='+', | 611 parser.add_argument('source_files', type=str, nargs='+', |
604 help='The source features.json files') | 612 help='The source features.json files') |
605 args = parser.parse_args() | 613 args = parser.parse_args() |
606 if args.feature_class not in FEATURE_CLASSES: | 614 if args.feature_class not in FEATURE_CLASSES: |
607 raise NameError('Unknown feature class: %s' % args.feature_class) | 615 raise NameError('Unknown feature class: %s' % args.feature_class) |
608 c = FeatureCompiler(args.chrome_root, args.source_files, args.feature_class, | 616 c = FeatureCompiler(args.chrome_root, args.source_files, args.feature_class, |
609 args.provider_class, args.out_root, | 617 args.provider_class, args.out_root, |
610 args.out_base_filename) | 618 args.out_base_filename) |
611 c.Compile() | 619 c.Compile() |
612 c.Write() | 620 c.Write() |
OLD | NEW |