Bug 914826 - part 5 - provide for cpp-only include files, starting with nsIFile.h and GeckoProfiler.h; r=ehsan

This commit is contained in:
Nathan Froyd 2013-09-10 15:45:16 -04:00
Родитель 9a8580e6d3
Коммит 60a46410da
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -51,7 +51,10 @@ HeaderIncludes = (
'nsAutoPtr.h', 'nsAutoPtr.h',
'nsStringGlue.h', 'nsStringGlue.h',
'nsTArray.h', 'nsTArray.h',
'nsIFile.h',
'mozilla/ipc/ProtocolUtils.h', 'mozilla/ipc/ProtocolUtils.h',
'GeckoProfiler.h' )
CppIncludes = (
'nsIFile.h',
'GeckoProfiler.h',
) )

Просмотреть файл

@ -6,6 +6,7 @@ import os, re, sys
from copy import deepcopy from copy import deepcopy
import ipdl.ast import ipdl.ast
import ipdl.builtin
from ipdl.cxx.ast import * from ipdl.cxx.ast import *
from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor
@ -2553,6 +2554,9 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
CppDirective('endif') CppDirective('endif')
]) ])
cppheaders = [CppDirective('include', '"%s"' % filename)
for filename in ipdl.builtin.CppIncludes]
cf.addthings(( cf.addthings((
[ Whitespace.NL ] [ Whitespace.NL ]
+ self.protocolCxxIncludes + self.protocolCxxIncludes
@ -2560,6 +2564,8 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
+ self.standardTypedefs() + self.standardTypedefs()
+ tu.protocol.decl.cxxtypedefs + tu.protocol.decl.cxxtypedefs
+ self.includedActorUsings + self.includedActorUsings
+ [ Whitespace.NL ]
+ cppheaders
+ [ Whitespace.NL ])) + [ Whitespace.NL ]))
cppns = makeNamespace(self.protocol, cf) cppns = makeNamespace(self.protocol, cf)