Lines Matching refs:Append
65 c.Append(cpp_util.CHROMIUM_LICENSE)
66 c.Append()
67 c.Append(cpp_util.GENERATED_BUNDLE_FILE_MESSAGE % self._source_file_dir)
69 c.Append()
70 c.Append('#ifndef %s' % ifndef_name)
71 c.Append('#define %s' % ifndef_name)
72 c.Append()
74 c.Append()
75 c.Append('#endif // %s' % ifndef_name)
76 c.Append()
88 ifdefs.append('defined(OS_CHROMEOS)')
90 ifdefs.append('defined(OS_LINUX)')
92 ifdefs.append('defined(OS_MACOSX)')
94 ifdefs.append('defined(OS_WIN)')
103 c.Append("#if %s" % function_ifdefs, indent_level=0)
106 c.Append("registry->RegisterFunction<%sFunction>();" % (
110 c.Append("#endif // %s" % function_ifdefs, indent_level=0)
115 c.Append('// static')
121 c.Append("#if %s" % namespace_ifdefs, indent_level=0)
140 c.Append("#endif // %s" % namespace_ifdefs, indent_level=0)
153 c.Append('#include <string>')
154 c.Append()
155 c.Append('#include "base/basictypes.h"')
156 c.Append()
157 c.Append("class ExtensionFunctionRegistry;")
158 c.Append()
160 c.Append()
161 c.Append('class GeneratedFunctionRegistry {')
163 c.Append('static void RegisterAll('
166 c.Append()
179 c.Append(cpp_util.CHROMIUM_LICENSE)
180 c.Append()
181 c.Append('#include "%s"' % (os.path.join(self._bundle._source_file_dir,
183 c.Append()
201 c.Append("#if %s" % ifdefs, indent_level=0)
203 c.Append('#include "%s"' % implementation_header)
206 c.Append("#endif // %s" % ifdefs, indent_level=0)
207 c.Append()
208 c.Append('#include '
210 c.Append()
212 c.Append()
214 c.Append()
216 c.Append()
227 c.Append('#include <map>')
228 c.Append('#include <string>')
229 c.Append()
230 c.Append('#include "base/strings/string_piece.h"')
231 c.Append()
233 c.Append()
234 c.Append('class GeneratedSchemas {')
236 c.Append('// Determines if schema named |name| is generated.')
237 c.Append('static bool IsGenerated(std::string name);')
238 c.Append()
239 c.Append('// Gets the API schema named |name|.')
240 c.Append('static base::StringPiece Get(const std::string& name);')
242 c.Append()
263 c.Append(cpp_util.CHROMIUM_LICENSE)
264 c.Append()
265 c.Append('#include "%s"' % (os.path.join(self._bundle._source_file_dir,
267 c.Append()
268 c.Append('#include "base/lazy_instance.h"')
269 c.Append()
270 c.Append('namespace {')
284 c.Append('const char %s[] = "%s";' %
286 c.Append('}')
288 c.Append()
293 c.Append('schemas["%s"] = %s;' % (namespace.name,
296 c.Append()
297 c.Append('std::map<std::string, const char*> schemas;')
299 c.Append()
300 c.Append('base::LazyInstance<Static> g_lazy_instance;')
301 c.Append()
302 c.Append('// static')
305 c.Append('return IsGenerated(name) ? '
308 c.Append()
309 c.Append('// static')
311 c.Append('return g_lazy_instance.Get().schemas.count(name) > 0;')
313 c.Append()
315 c.Append()