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

Unified Diff: third_party/WebKit/Source/build/scripts/make_experimental_features.py

Issue 1538663003: Add code generation for ExperimentalFeatures class from RuntimeEnabledFeatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix broken GN build dependency Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_runtime_features.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/make_experimental_features.py
diff --git a/third_party/WebKit/Source/build/scripts/make_internal_runtime_flags.py b/third_party/WebKit/Source/build/scripts/make_experimental_features.py
similarity index 73%
copy from third_party/WebKit/Source/build/scripts/make_internal_runtime_flags.py
copy to third_party/WebKit/Source/build/scripts/make_experimental_features.py
index 216ed4314b407d5f86bf013cb2cf2a14652d2cbe..05fc835307f41f5794575a27bec3f657293c7068 100755
--- a/third_party/WebKit/Source/build/scripts/make_internal_runtime_flags.py
+++ b/third_party/WebKit/Source/build/scripts/make_experimental_features.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2013 Google Inc. All rights reserved.
+# Copyright (C) 2015 Google Inc. All rights reserved.
haraken 2015/12/24 15:46:51 Nit: You can use the 3-line copyright.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -27,7 +27,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os.path
import sys
import in_generator
@@ -38,33 +37,31 @@ import template_expander
# We want exactly the same parsing as RuntimeFeatureWriter
# but generate different files.
-class InternalRuntimeFlagsWriter(make_runtime_features.RuntimeFeatureWriter):
- class_name = 'InternalRuntimeFlags'
+class ExperimentalFeatureWriter(make_runtime_features.RuntimeFeatureWriter):
+ class_name = 'ExperimentalFeatures'
filters = {
'enable_conditional': name_utilities.enable_conditional_if_endif,
}
def __init__(self, in_file_path):
- super(InternalRuntimeFlagsWriter, self).__init__(in_file_path)
- self._outputs = {(self.class_name + '.idl'): self.generate_idl,
- (self.class_name + '.h'): self.generate_header,
- }
+ super(ExperimentalFeatureWriter, self).__init__(in_file_path)
+ self._outputs = {
+ (self.class_name + '.cpp'): self.generate_implementation,
+ (self.class_name + '.h'): self.generate_header,
+ }
- @template_expander.use_jinja(class_name + '.idl.tmpl')
- def generate_idl(self):
+ @template_expander.use_jinja(class_name + '.cpp.tmpl')
+ def generate_implementation(self):
return {
'features': self._features,
- 'standard_features': self._standard_features,
}
@template_expander.use_jinja(class_name + '.h.tmpl', filters=filters)
def generate_header(self):
return {
'features': self._features,
- 'feature_sets': self._feature_sets(),
- 'standard_features': self._standard_features,
}
if __name__ == '__main__':
- in_generator.Maker(InternalRuntimeFlagsWriter).main(sys.argv)
+ in_generator.Maker(ExperimentalFeatureWriter).main(sys.argv)
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_runtime_features.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698