3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 import media_feature_symbol
9 import template_expander
14 class MakeMediaFeaturesWriter(in_generator
.Writer
):
16 'Conditional': None, # FIXME: Add support for Conditional.
17 'RuntimeEnabled': None,
18 'ImplementedAs': None,
21 'symbol': media_feature_symbol
.getMediaFeatureSymbolWithSuffix(''),
22 'to_macro_style': name_utilities
.to_macro_style
,
24 default_parameters
= {
29 def __init__(self
, in_file_path
):
30 super(MakeMediaFeaturesWriter
, self
).__init
__(in_file_path
)
33 ('MediaFeatures.h'): self
.generate_header
,
35 self
._template
_context
= {
38 'entries': self
.in_file
.name_dictionaries
,
41 @template_expander.use_jinja('MediaFeatures.h.tmpl', filters
=filters
)
42 def generate_header(self
):
43 return self
._template
_context
45 if __name__
== '__main__':
46 in_generator
.Maker(MakeMediaFeaturesWriter
).main(sys
.argv
)