Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_runtime_features.py

Issue 1895293002: Test fragment scrolling and history restoration interaction w/ scroll anchoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove .cpp.tmpl and other review comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 valid_values = { 42 valid_values = {
43 'status': ['stable', 'experimental', 'test'], 43 'status': ['stable', 'experimental', 'test'],
44 } 44 }
45 defaults = { 45 defaults = {
46 'origin_trial_feature_name': None, 46 'origin_trial_feature_name': None,
47 'condition': None, 47 'condition': None,
48 'implied_by': [], 48 'implied_by': [],
49 'depends_on': [], 49 'depends_on': [],
50 'custom': False, 50 'custom': False,
51 'status': None, 51 'status': None,
52 'settable_from_internals': False,
52 } 53 }
53 54
54 def __init__(self, in_file_path): 55 def __init__(self, in_file_path):
55 super(RuntimeFeatureWriter, self).__init__(in_file_path) 56 super(RuntimeFeatureWriter, self).__init__(in_file_path)
56 self._outputs = {(self.class_name + '.h'): self.generate_header, 57 self._outputs = {(self.class_name + '.h'): self.generate_header,
57 (self.class_name + '.cpp'): self.generate_implementatio n, 58 (self.class_name + '.cpp'): self.generate_implementatio n,
58 } 59 }
59 60
60 self._features = self.in_file.name_dictionaries 61 self._features = self.in_file.name_dictionaries
61 # Make sure the resulting dictionaries have all the keys we expect. 62 # Make sure the resulting dictionaries have all the keys we expect.
(...skipping 26 matching lines...) Expand all
88 def generate_header(self): 89 def generate_header(self):
89 return self._template_inputs() 90 return self._template_inputs()
90 91
91 @template_expander.use_jinja(class_name + '.cpp.tmpl') 92 @template_expander.use_jinja(class_name + '.cpp.tmpl')
92 def generate_implementation(self): 93 def generate_implementation(self):
93 return self._template_inputs() 94 return self._template_inputs()
94 95
95 96
96 if __name__ == '__main__': 97 if __name__ == '__main__':
97 in_generator.Maker(RuntimeFeatureWriter).main(sys.argv) 98 in_generator.Maker(RuntimeFeatureWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698