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

Side by Side Diff: mojo/public/tools/bindings/pylib/mojom/generate/module.py

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 # This module's classes provide an interface to mojo modules. Modules are 5 # This module's classes provide an interface to mojo modules. Modules are
6 # collections of interfaces and structs to be used by mojo ipc clients and 6 # collections of interfaces and structs to be used by mojo ipc clients and
7 # servers. 7 # servers.
8 # 8 #
9 # A simple interface would be created this way: 9 # A simple interface would be created this way:
10 # module = mojom.generate.module.Module('Foo') 10 # module = mojom.generate.module.Module('Foo')
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 self.key_kind = key_kind 271 self.key_kind = key_kind
272 self.value_kind = value_kind 272 self.value_kind = value_kind
273 273
274 274
275 class InterfaceRequest(ReferenceKind): 275 class InterfaceRequest(ReferenceKind):
276 ReferenceKind.AddSharedProperty('kind') 276 ReferenceKind.AddSharedProperty('kind')
277 277
278 def __init__(self, kind=None): 278 def __init__(self, kind=None):
279 if kind is not None: 279 if kind is not None:
280 if not isinstance(kind, Interface):
281 raise Exception(
282 "Interface request requires %r to be an interface." % kind.spec)
280 ReferenceKind.__init__(self, 'r:' + kind.spec) 283 ReferenceKind.__init__(self, 'r:' + kind.spec)
281 else: 284 else:
282 ReferenceKind.__init__(self) 285 ReferenceKind.__init__(self)
283 self.kind = kind 286 self.kind = kind
284 287
285 288
286 class Parameter(object): 289 class Parameter(object):
287 def __init__(self, name=None, kind=None, ordinal=None, default=None): 290 def __init__(self, name=None, kind=None, ordinal=None, default=None):
288 self.name = name 291 self.name = name
289 self.ordinal = ordinal 292 self.ordinal = ordinal
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 491
489 return not ContainsHandles(kind, set()) 492 return not ContainsHandles(kind, set())
490 493
491 494
492 def HasCallbacks(interface): 495 def HasCallbacks(interface):
493 for method in interface.methods: 496 for method in interface.methods:
494 if method.response_parameters != None: 497 if method.response_parameters != None:
495 return True 498 return True
496 return False 499 return False
497 500
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698