Home | History | Annotate | Download | only in webkit2

Lines Matching refs:message

61         return itertools.chain((parameter for message in self.messages for parameter in message.parameters),
62 (reply_parameter for message in self.messages if message.reply_parameters for reply_parameter in message.reply_parameters))
110 messages.append(Message(name, parameters, reply_parameters, is_delayed, dispatch_on_connection_queue, condition))
114 class Message(object):
156 result += [surround_in_condition(' %s,\n' % message.id(), message.condition) for message in messages]
202 def base_class(message):
203 return arguments_type(message.parameters, function_parameter_type)
206 def reply_type(message):
207 return arguments_type(message.reply_parameters, reply_parameter_type)
210 def decode_type(message):
211 if message.is_variadic:
212 return arguments_type(message.parameters[:-1], reply_parameter_type)
213 return base_class(message)
216 def delayed_reply_type(message):
217 return arguments_type(message.reply_parameters, function_parameter_type)
220 def message_to_struct_declaration(message):
222 function_parameters = [(function_parameter_type(x.type), x.name) for x in message.parameters]
223 result.append('struct %s : %s' % (message.name, base_class(message)))
225 result.append(' static const Kind messageID = %s;\n' % message.id())
226 if message.reply_parameters != None:
227 if message.is_delayed:
228 send_parameters = [(function_parameter_type(x.type), x.name) for x in message.reply_parameters]
240 result.append(' typedef %s Reply;\n' % reply_type(message))
242 result.append(' typedef %s DecodeType;\n' % decode_type(message))
244 result.append(' %s%s(%s)' % (len(function_parameters) == 1 and 'explicit ' or '', message.name, ', '.join([' '.join(x) for x in function_parameters])))
245 result.append('\n : %s(%s)\n' % (base_class(message), ', '.join([x[1] for x in function_parameters])))
249 return surround_in_condition(''.join(result), message.condition)
301 for message in receiver.messages:
302 if message.reply_parameters != None and message.is_delayed:
372 def handler_function(receiver, message):
373 if message.name.find('URL') == 0:
374 return '%s::%s' % (receiver.name, 'url' + message.name[3:])
375 return '%s::%s' % (receiver.name, message.name[0].lower() + message.name[1:])
378 def async_case_statement(receiver, message):
380 if message.is_variadic:
384 result.append(' case Messages::%s::%s:\n' % (receiver.name, message.id()))
385 result.append(' CoreIPC::%s<Messages::%s::%s>(arguments, this, &%s);\n' % (dispatch_function, receiver.name, message.name, handler_function(receiver, message)))
387 return surround_in_condition(''.join(result), message.condition)
390 def sync_case_statement(receiver, message):
392 if message.is_delayed:
394 if message.is_variadic:
398 result.append(' case Messages::%s::%s:\n' % (receiver.name, message.id()))
399 result.append(' CoreIPC::%s<Messages::%s::%s>(%sarguments, reply, this, &%s);\n' % (dispatch_function, receiver.name, message.name, 'connection, ' if message.is_delayed else '', handler_function(receiver, message)))
401 if message.is_delayed:
406 return surround_in_condition(''.join(result), message.condition)
499 for message in receiver.messages:
500 if message.reply_parameters is not None:
501 for reply_parameter in message.reply_parameters:
506 headers[header] = message.condition
511 headers[header] = message.condition
533 for message in receiver.messages:
534 if message.reply_parameters != None and message.is_delayed:
535 sync_delayed_messages.append(message)
540 for message in sync_delayed_messages:
541 send_parameters = [(function_parameter_type(x.type), x.name) for x in message.reply_parameters]
543 if message.condition:
544 result.append('#if %s\n\n' % message.condition)
546 result.append('%s::DelayedReply::DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::ArgumentEncoder> arguments)\n' % message.name)
552 result.append('%s::DelayedReply::~DelayedReply()\n' % message.name)
557 result.append('bool %s::DelayedReply::send(%s)\n' % (message.name, ', '.join([' '.join(x) for x in send_parameters])))
560 result += [' m_arguments->encode(%s);\n' % x.name for x in message.reply_parameters]
567 if message.condition:
576 for message in receiver.messages:
577 if message.reply_parameters is not None:
578 sync_messages.append(message)
580 async_messages.append(message)
586 result += [async_case_statement(receiver, message) for message in async_messages]
598 result += [sync_case_statement(receiver, message) for message in sync_messages]