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

Unified Diff: core/scripts/make_runtime_features.py

Issue 15685002: IDL roll. (Closed) Base URL: http://dart.googlecode.com/svn/third_party/WebCore/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/scripts/make_event_factory.py ('k') | core/storage/Storage.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/scripts/make_runtime_features.py
===================================================================
--- core/scripts/make_runtime_features.py (revision 22811)
+++ core/scripts/make_runtime_features.py (working copy)
@@ -97,11 +97,6 @@
lowered = lowered.replace("iME", "ime")
return lowered
- def _wrap_with_condition(self, string, condition):
- if not condition:
- return string
- return "#if ENABLE(%(condition)s)\n%(string)s\n#endif" % { 'condition' : condition, 'string' : string }
-
def _method_declaration(self, feature):
if feature['custom']:
return " static bool %(first_lowered_name)sEnabled();\n" % feature
@@ -118,7 +113,7 @@
def _storage_declarations(self, feature):
declaration = " static bool is%(name)sEnabled;" % feature
- return self._wrap_with_condition(declaration, feature['condition'])
+ return self.wrap_with_condition(declaration, feature['condition'])
def generate_header(self):
return HEADER_TEMPLATE % {
@@ -130,7 +125,7 @@
def _storage_definition(self, feature):
definition = "bool RuntimeEnabledFeatures::is%(name)sEnabled = %(default)s;" % feature
- return self._wrap_with_condition(definition, feature['condition'])
+ return self.wrap_with_condition(definition, feature['condition'])
def generate_implementation(self):
return IMPLEMENTATION_TEMPLATE % {
« no previous file with comments | « core/scripts/make_event_factory.py ('k') | core/storage/Storage.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698