Lines Matching refs:Append

69     c.Append(cpp_util.CHROMIUM_LICENSE)
70 c.Append()
71 c.Append(cpp_util.GENERATED_BUNDLE_FILE_MESSAGE % self._source_file_dir)
74 c.Append()
75 c.Append('#ifndef %s' % ifndef_name)
76 c.Append('#define %s' % ifndef_name)
77 c.Append()
79 c.Append()
80 c.Append('#endif // %s' % ifndef_name)
81 c.Append()
108 c.Append("#if %s" % function_ifdefs, indent_level=0)
111 c.Append("registry->RegisterFunction<%sFunction>();" % (
115 c.Append("#endif // %s" % function_ifdefs, indent_level=0)
120 c.Append('// static')
126 c.Append("#if %s" % namespace_ifdefs, indent_level=0)
145 c.Append("#endif // %s" % namespace_ifdefs, indent_level=0)
158 c.Append('#include <string>')
159 c.Append()
160 c.Append('#include "base/basictypes.h"')
161 c.Append()
162 c.Append("class ExtensionFunctionRegistry;")
163 c.Append()
165 c.Append()
166 c.Append('class GeneratedFunctionRegistry {')
168 c.Append('static void RegisterAll('
171 c.Append()
184 c.Append(cpp_util.CHROMIUM_LICENSE)
185 c.Append()
186 c.Append('#include "%s"' % (
189 c.Append()
207 c.Append("#if %s" % ifdefs, indent_level=0)
209 c.Append('#include "%s"' % implementation_header)
212 c.Append("#endif // %s" % ifdefs, indent_level=0)
213 c.Append()
214 c.Append('#include '
216 c.Append()
218 c.Append()
220 c.Append()
222 c.Append()
233 c.Append('#include <map>')
234 c.Append('#include <string>')
235 c.Append()
236 c.Append('#include "base/strings/string_piece.h"')
237 c.Append()
239 c.Append()
240 c.Append('class GeneratedSchemas {')
242 c.Append('// Determines if schema named |name| is generated.')
243 c.Append('static bool IsGenerated(std::string name);')
244 c.Append()
245 c.Append('// Gets the API schema named |name|.')
246 c.Append('static base::StringPiece Get(const std::string& name);')
248 c.Append()
269 c.Append(cpp_util.CHROMIUM_LICENSE)
270 c.Append()
271 c.Append('#include "%s"' % (os.path.join(self._bundle._source_file_dir,
273 c.Append()
274 c.Append('#include "base/lazy_instance.h"')
275 c.Append()
276 c.Append('namespace {')
290 c.Append('const char %s[] = "%s";' %
292 c.Append('}')
294 c.Append()
299 c.Append('schemas["%s"] = %s;' % (namespace.name,
302 c.Append()
303 c.Append('std::map<std::string, const char*> schemas;')
305 c.Append()
306 c.Append('base::LazyInstance<Static> g_lazy_instance;')
307 c.Append()
308 c.Append('// static')
311 c.Append('return IsGenerated(name) ? '
314 c.Append()
315 c.Append('// static')
317 c.Append('return g_lazy_instance.Get().schemas.count(name) > 0;')
319 c.Append()
321 c.Append()