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

Side by Side Diff: Source/bindings/scripts/v8_types.py

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed LICENSE and windows build Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 # Includes 285 # Includes
286 ################################################################################ 286 ################################################################################
287 287
288 def includes_for_cpp_class(class_name, relative_dir_posix): 288 def includes_for_cpp_class(class_name, relative_dir_posix):
289 return set([posixpath.join('bindings', relative_dir_posix, class_name + '.h' )]) 289 return set([posixpath.join('bindings', relative_dir_posix, class_name + '.h' )])
290 290
291 291
292 INCLUDES_FOR_TYPE = { 292 INCLUDES_FOR_TYPE = {
293 'object': set(), 293 'object': set(),
294 'CompareHow': set(), 294 'CompareHow': set(),
295 'Dictionary': set(['bindings/core/v8/Dictionary.h']), 295 'Dictionary': set(['bindings/core/v8/Dictionary.h',
296 'bindings/core/v8/DictionaryHelper.h']),
296 'EventHandler': set(['bindings/core/v8/V8AbstractEventListener.h', 297 'EventHandler': set(['bindings/core/v8/V8AbstractEventListener.h',
297 'bindings/core/v8/V8EventListenerList.h']), 298 'bindings/core/v8/V8EventListenerList.h']),
298 'EventListener': set(['bindings/core/v8/BindingSecurity.h', 299 'EventListener': set(['bindings/core/v8/BindingSecurity.h',
299 'bindings/core/v8/V8EventListenerList.h', 300 'bindings/core/v8/V8EventListenerList.h',
300 'core/frame/LocalDOMWindow.h']), 301 'core/frame/LocalDOMWindow.h']),
301 'HTMLCollection': set(['bindings/core/v8/V8HTMLCollection.h', 302 'HTMLCollection': set(['bindings/core/v8/V8HTMLCollection.h',
302 'core/dom/ClassCollection.h', 303 'core/dom/ClassCollection.h',
303 'core/dom/TagCollection.h', 304 'core/dom/TagCollection.h',
304 'core/html/HTMLCollection.h', 305 'core/html/HTMLCollection.h',
305 'core/html/HTMLFormControlsCollection.h', 306 'core/html/HTMLFormControlsCollection.h',
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 715
715 def literal_cpp_value(idl_type, idl_literal): 716 def literal_cpp_value(idl_type, idl_literal):
716 """Converts an expression that is a valid C++ literal for this type.""" 717 """Converts an expression that is a valid C++ literal for this type."""
717 # FIXME: add validation that idl_type and idl_literal are compatible 718 # FIXME: add validation that idl_type and idl_literal are compatible
718 literal_value = str(idl_literal) 719 literal_value = str(idl_literal)
719 if idl_type.base_type in CPP_UNSIGNED_TYPES: 720 if idl_type.base_type in CPP_UNSIGNED_TYPES:
720 return literal_value + 'u' 721 return literal_value + 'u'
721 return literal_value 722 return literal_value
722 723
723 IdlType.literal_cpp_value = literal_cpp_value 724 IdlType.literal_cpp_value = literal_cpp_value
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698