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

Side by Side Diff: third_party/chrome/tools/json_schema_compiler/cc_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 from code import Code 5 from code import Code
6 from model import PropertyType, Type 6 from model import PropertyType, Type
7 import cpp_util 7 import cpp_util
8 import model 8 import model
9 import schema_util 9 import schema_util
10 import sys 10 import sys
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 """ 802 """
803 c = Code() 803 c = Code()
804 underlying_type = self._type_helper.FollowRef(prop.type_) 804 underlying_type = self._type_helper.FollowRef(prop.type_)
805 if (underlying_type.property_type == PropertyType.ENUM and 805 if (underlying_type.property_type == PropertyType.ENUM and
806 prop.optional): 806 prop.optional):
807 c.Append('%s->%s = %s;' % ( 807 c.Append('%s->%s = %s;' % (
808 dst, 808 dst,
809 prop.unix_name, 809 prop.unix_name,
810 self._type_helper.GetEnumNoneValue(prop.type_))) 810 self._type_helper.GetEnumNoneValue(prop.type_)))
811 return c 811 return c
OLDNEW
« no previous file with comments | « third_party/chrome/tools/json_schema_compiler/README ('k') | third_party/chrome/tools/json_schema_compiler/code.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698