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

Unified Diff: client/dom/scripts/generator.py

Issue 9814012: Proper include forms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « no previous file | client/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/generator.py
diff --git a/client/dom/scripts/generator.py b/client/dom/scripts/generator.py
index ef918cf581575de2e778eb6767f7f7a65d576a23..b235c0e370d3adb66767b95efea4d67e30e0a024 100644
--- a/client/dom/scripts/generator.py
+++ b/client/dom/scripts/generator.py
@@ -501,15 +501,32 @@ class IDLTypeInfo(object):
if self._has_dart_wrapper:
wrapper_type = 'Dart%s' % self.idl_type()
adapter_type = 'ParameterAdapter<%s, %s>' % (native_type, wrapper_type)
- return (adapter_type, wrapper_type)
- return ('ParameterAdapter< %s >' % native_type, self._idl_type)
+ return (adapter_type, '"%s.h"' % wrapper_type)
+ return ('ParameterAdapter< %s >' % native_type, '"%s.h"' % self._idl_type)
def parameter_type(self):
return '%s*' % self.native_type()
def webcore_includes(self):
+ WTF_INCLUDES = [
+ 'ArrayBuffer',
+ 'ArrayBufferView',
+ 'Float32Array',
+ 'Float64Array',
+ 'Int8Array',
+ 'Int16Array',
+ 'Int32Array',
+ 'Uint8Array',
+ 'Uint16Array',
+ 'Uint32Array',
+ 'Uint8ClampedArray',
+ ]
+
+ if self._idl_type in WTF_INCLUDES:
+ return ['<wtf/%s.h>' % self._idl_type]
+
if not self._idl_type.startswith('SVG'):
- return [self._idl_type]
+ return ['"%s.h"' % self._idl_type]
if self._idl_type in ['SVGNumber', 'SVGPoint']:
return []
@@ -517,13 +534,13 @@ class IDLTypeInfo(object):
include = self._idl_type.replace('Abs', '').replace('Rel', '')
else:
include = self._idl_type
- return [include] + _svg_supplemental_includes
+ return ['"%s.h"' % include] + _svg_supplemental_includes
def receiver(self):
return 'receiver->'
def conversion_includes(self):
- return ['Dart%s' % include for include in [self.dart_type()] + self._conversion_includes]
+ return ['"Dart%s.h"' % include for include in [self.dart_type()] + self._conversion_includes]
def conversion_cast(self, expression):
if self._conversion_template:
@@ -656,12 +673,12 @@ _idl_type_registry = {
}
_svg_supplemental_includes = [
- 'SVGAnimatedPropertyTearOff',
- 'SVGAnimatedListPropertyTearOff',
- 'SVGStaticListPropertyTearOff',
- 'SVGAnimatedListPropertyTearOff',
- 'SVGTransformListPropertyTearOff',
- 'SVGPathSegListPropertyTearOff',
+ '"SVGAnimatedPropertyTearOff.h"',
+ '"SVGAnimatedListPropertyTearOff.h"',
+ '"SVGStaticListPropertyTearOff.h"',
+ '"SVGAnimatedListPropertyTearOff.h"',
+ '"SVGTransformListPropertyTearOff.h"',
+ '"SVGPathSegListPropertyTearOff.h"',
]
def GetIDLTypeInfo(idl_type_name):
« no previous file with comments | « no previous file | client/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698