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

Side by Side Diff: ppapi/generators/idl_gen_pnacl.py

Issue 305233002: PPAPI: Make "no_interface_string" APIs have no PNaCl wrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 6 years, 6 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
« no previous file with comments | « no previous file | ppapi/generators/idl_gen_wrapper.py » ('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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generator for Pnacl Shim functions that bridges the calling conventions 6 """Generator for Pnacl Shim functions that bridges the calling conventions
7 between GCC and PNaCl. """ 7 between GCC and PNaCl. """
8 8
9 from datetime import datetime 9 from datetime import datetime
10 import difflib 10 import difflib
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 53
54 def InterfaceVersionNeedsWrapping(self, iface, version): 54 def InterfaceVersionNeedsWrapping(self, iface, version):
55 """Return true if the interface+version has ANY methods that 55 """Return true if the interface+version has ANY methods that
56 need wrapping. 56 need wrapping.
57 """ 57 """
58 if self._skip_opt: 58 if self._skip_opt:
59 return True 59 return True
60 if iface.GetName().endswith('Trusted'): 60 if iface.GetName().endswith('Trusted'):
61 return False 61 return False
62 # TODO(dmichael): We have no way to wrap PPP_ interfaces without an
63 # interface string. If any ever need wrapping, we'll need to figure out a
64 # way to get the plugin-side of the Pepper proxy (within the IRT) to access
65 # and use the wrapper.
66 if iface.GetProperty("no_interface_string"):
67 return False
62 for member in iface.GetListOf('Member'): 68 for member in iface.GetListOf('Member'):
63 release = member.GetRelease(version) 69 release = member.GetRelease(version)
64 if self.MemberNeedsWrapping(member, release): 70 if self.MemberNeedsWrapping(member, release):
65 return True 71 return True
66 return False 72 return False
67 73
68 74
69 def MemberNeedsWrapping(self, member, release): 75 def MemberNeedsWrapping(self, member, release):
70 """Return true if a particular member function at a particular 76 """Return true if a particular member function at a particular
71 release needs wrapping. 77 release needs wrapping.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return TestFiles(filenames, test_releases) 275 return TestFiles(filenames, test_releases)
270 276
271 # Otherwise, generate the output file (for potential use as golden file). 277 # Otherwise, generate the output file (for potential use as golden file).
272 ast = ParseFiles(filenames) 278 ast = ParseFiles(filenames)
273 return pnaclgen.GenerateRange(ast, test_releases, filenames) 279 return pnaclgen.GenerateRange(ast, test_releases, filenames)
274 280
275 281
276 if __name__ == '__main__': 282 if __name__ == '__main__':
277 retval = Main(sys.argv[1:]) 283 retval = Main(sys.argv[1:])
278 sys.exit(retval) 284 sys.exit(retval)
OLDNEW
« no previous file with comments | « no previous file | ppapi/generators/idl_gen_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698