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

Side by Side Diff: sky/engine/build/scripts/make_event_factory.py

Issue 941243002: Remove CustomEvent from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | sky/engine/core/core.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 from in_file import InFile 34 from in_file import InFile
35 import name_macros 35 import name_macros
36 import name_utilities 36 import name_utilities
37 import template_expander 37 import template_expander
38 38
39 39
40 def case_insensitive_matching(name): 40 def case_insensitive_matching(name):
41 return (name == ('HTMLEvents') 41 return (name == ('HTMLEvents')
42 or name == 'Event' 42 or name == 'Event'
43 or name == 'Events' 43 or name == 'Events'
44 or name.startswith('UIEvent') 44 or name.startswith('UIEvent'))
45 or name.startswith('CustomEvent'))
46 45
47 class EventFactoryWriter(name_macros.Writer): 46 class EventFactoryWriter(name_macros.Writer):
48 defaults = { 47 defaults = {
49 'ImplementedAs': None, 48 'ImplementedAs': None,
50 'Conditional': None, 49 'Conditional': None,
51 'RuntimeEnabled': None, 50 'RuntimeEnabled': None,
52 } 51 }
53 default_parameters = { 52 default_parameters = {
54 'namespace': '', 53 'namespace': '',
55 'suffix': '', 54 'suffix': '',
56 } 55 }
57 filters = { 56 filters = {
58 'cpp_name': name_utilities.cpp_name, 57 'cpp_name': name_utilities.cpp_name,
59 'enable_conditional': name_utilities.enable_conditional_if_endif, 58 'enable_conditional': name_utilities.enable_conditional_if_endif,
60 'lower_first': name_utilities.lower_first, 59 'lower_first': name_utilities.lower_first,
61 'case_insensitive_matching': case_insensitive_matching, 60 'case_insensitive_matching': case_insensitive_matching,
62 'script_name': name_utilities.script_name, 61 'script_name': name_utilities.script_name,
63 } 62 }
64 63
65 def __init__(self, in_file_path): 64 def __init__(self, in_file_path):
66 super(EventFactoryWriter, self).__init__(in_file_path) 65 super(EventFactoryWriter, self).__init__(in_file_path)
67 66
68 if __name__ == "__main__": 67 if __name__ == "__main__":
69 name_macros.Maker(EventFactoryWriter).main(sys.argv) 68 name_macros.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/core.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698