Esempio n. 1
0
 def _GetNamespace(self, fake_content, filename):
   """Returns a namespace object for the given content"""
   api_def = idl_schema.Process(fake_content, filename)
   m = model.Model()
   return m.AddNamespace(api_def[0], filename)
Esempio n. 2
0
 def _GetNamespace(self, fake_content, filename, is_idl):
   """Returns a namespace object for the given content"""
   api_def = (idl_schema.Process(fake_content, filename) if is_idl
       else json_parse.Parse(fake_content))
   m = model.Model()
   return m.AddNamespace(api_def[0], filename)