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

Side by Side Diff: third_party/chrome/tools/json_schema_compiler/schema_bundle_generator.py

Issue 12300042: Update idlsync.py to pull in dependencies required for chrome api generation. (Closed) Base URL: git://github.com/dart-lang/bleeding_edge.git@master
Patch Set: From another checkout Created 7 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import code 5 import code
6 import cpp_util 6 import cpp_util
7 from model import Platforms 7 from model import Platforms
8 from schema_util import CapitalizeFirstLetter 8 from schema_util import CapitalizeFirstLetter
9 from schema_util import JsFunctionNameToClassName 9 from schema_util import JsFunctionNameToClassName
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 separators=(',', ':')) 200 separators=(',', ':'))
201 # Escape all double-quotes and backslashes. For this to output a valid 201 # Escape all double-quotes and backslashes. For this to output a valid
202 # JSON C string, we need to escape \ and ". 202 # JSON C string, we need to escape \ and ".
203 json_content = json_content.replace('\\', '\\\\').replace('"', '\\"') 203 json_content = json_content.replace('\\', '\\\\').replace('"', '\\"')
204 c.Append('(*schemas)["%s"] = "%s";' % (namespace.name, json_content)) 204 c.Append('(*schemas)["%s"] = "%s";' % (namespace.name, json_content))
205 c.Eblock('}') 205 c.Eblock('}')
206 c.Append() 206 c.Append()
207 c.Concat(self._cpp_type_generator.GetRootNamespaceEnd()) 207 c.Concat(self._cpp_type_generator.GetRootNamespaceEnd())
208 c.Append() 208 c.Append()
209 return c 209 return c
OLDNEW
« no previous file with comments | « third_party/chrome/tools/json_schema_compiler/preview.py ('k') | third_party/chrome/tools/json_schema_compiler/schema_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698