| Index: chrome/common/worker_messages_internal.h
|
| ===================================================================
|
| --- chrome/common/worker_messages_internal.h (revision 68536)
|
| +++ chrome/common/worker_messages_internal.h (working copy)
|
| @@ -8,128 +8,121 @@
|
| #include "googleurl/src/gurl.h"
|
| #include "ipc/ipc_message_macros.h"
|
|
|
| +#define IPC_MESSAGE_START WorkerMsgStart
|
|
|
| //-----------------------------------------------------------------------------
|
| // WorkerProcess messages
|
| // These are messages sent from the browser to the worker process.
|
| -IPC_BEGIN_MESSAGES(WorkerProcess)
|
| - IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker,
|
| - WorkerProcessMsg_CreateWorker_Params)
|
| +IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker,
|
| + WorkerProcessMsg_CreateWorker_Params)
|
|
|
| - // Note: these Message Port related messages can also be sent to the
|
| - // renderer process. Putting them here since we don't have a shared place
|
| - // like common_messages_internal.h
|
| - IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message,
|
| - string16 /* message */,
|
| - std::vector<int> /* sent_message_port_ids */,
|
| - std::vector<int> /* new_routing_ids */)
|
| +// Note: these Message Port related messages can also be sent to the
|
| +// renderer process. Putting them here since we don't have a shared place
|
| +// like common_messages_internal.h
|
| +IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message,
|
| + string16 /* message */,
|
| + std::vector<int> /* sent_message_port_ids */,
|
| + std::vector<int> /* new_routing_ids */)
|
|
|
| - // Tells the Message Port Channel object that there are no more in-flight
|
| - // messages arriving.
|
| - IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued)
|
| -IPC_END_MESSAGES(WorkerProcess)
|
| +// Tells the Message Port Channel object that there are no more in-flight
|
| +// messages arriving.
|
| +IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued)
|
|
|
|
|
| //-----------------------------------------------------------------------------
|
| // WorkerProcessHost messages
|
| // These are messages sent from the worker process to the browser process.
|
|
|
| -IPC_BEGIN_MESSAGES(WorkerProcessHost)
|
| - // Note: these Message Port related messages can also be sent out from the
|
| - // renderer process. Putting them here since we don't have a shared place
|
| - // like common_messages_internal.h
|
| +// Note: these Message Port related messages can also be sent out from the
|
| +// renderer process. Putting them here since we don't have a shared place
|
| +// like common_messages_internal.h
|
|
|
| - // Creates a new Message Port Channel object. The first paramaeter is the
|
| - // message port channel's routing id in this process. The second parameter
|
| - // is the process-wide-unique identifier for that port.
|
| - IPC_SYNC_MESSAGE_CONTROL0_2(WorkerProcessHostMsg_CreateMessagePort,
|
| - int /* route_id */,
|
| - int /* message_port_id */)
|
| +// Creates a new Message Port Channel object. The first paramaeter is the
|
| +// message port channel's routing id in this process. The second parameter
|
| +// is the process-wide-unique identifier for that port.
|
| +IPC_SYNC_MESSAGE_CONTROL0_2(WorkerProcessHostMsg_CreateMessagePort,
|
| + int /* route_id */,
|
| + int /* message_port_id */)
|
|
|
| - // Sent when a Message Port Channel object is destroyed.
|
| - IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort,
|
| - int /* message_port_id */)
|
| +// Sent when a Message Port Channel object is destroyed.
|
| +IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort,
|
| + int /* message_port_id */)
|
|
|
| - // Sends a message to a message port. Optionally sends a message port as
|
| - // as well if sent_message_port_id != MSG_ROUTING_NONE.
|
| - IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage,
|
| - int /* sender_message_port_id */,
|
| - string16 /* message */,
|
| - std::vector<int> /* sent_message_port_ids */)
|
| +// Sends a message to a message port. Optionally sends a message port as
|
| +// as well if sent_message_port_id != MSG_ROUTING_NONE.
|
| +IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage,
|
| + int /* sender_message_port_id */,
|
| + string16 /* message */,
|
| + std::vector<int> /* sent_message_port_ids */)
|
|
|
| - // Causes messages sent to the remote port to be delivered to this local port.
|
| - IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle,
|
| - int /* local_message_port_id */,
|
| - int /* remote_message_port_id */)
|
| +// Causes messages sent to the remote port to be delivered to this local port.
|
| +IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle,
|
| + int /* local_message_port_id */,
|
| + int /* remote_message_port_id */)
|
|
|
| - // Causes the browser to queue messages sent to this port until the the port
|
| - // has made sure that all in-flight messages were routed to the new
|
| - // destination.
|
| - IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages,
|
| - int /* message_port_id */)
|
| +// Causes the browser to queue messages sent to this port until the the port
|
| +// has made sure that all in-flight messages were routed to the new
|
| +// destination.
|
| +IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages,
|
| + int /* message_port_id */)
|
|
|
| - // Sends the browser all the queued messages that arrived at this message port
|
| - // after it was sent in a postMessage call.
|
| - // NOTE: MSVS can't compile the macro if std::vector<std::pair<string16, int> >
|
| - // is used, so we typedef it in worker_messages.h.
|
| - IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_SendQueuedMessages,
|
| - int /* message_port_id */,
|
| - std::vector<QueuedMessage> /* queued_messages */)
|
| +// Sends the browser all the queued messages that arrived at this message port
|
| +// after it was sent in a postMessage call.
|
| +// NOTE: MSVS can't compile the macro if std::vector<std::pair<string16, int> >
|
| +// is used, so we typedef it in worker_messages.h.
|
| +IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_SendQueuedMessages,
|
| + int /* message_port_id */,
|
| + std::vector<QueuedMessage> /* queued_messages */)
|
|
|
| - // Sent by the worker process to check whether access to web databases is
|
| - // granted by content settings.
|
| - IPC_SYNC_MESSAGE_ROUTED4_1(WorkerProcessHostMsg_AllowDatabase,
|
| - GURL /* origin url */,
|
| - string16 /* database name */,
|
| - string16 /* database display name */,
|
| - unsigned long /* estimated size */,
|
| - bool /* result */)
|
| -IPC_END_MESSAGES(WorkerProcessHost)
|
| +// Sent by the worker process to check whether access to web databases is
|
| +// granted by content settings.
|
| +IPC_SYNC_MESSAGE_ROUTED4_1(WorkerProcessHostMsg_AllowDatabase,
|
| + GURL /* origin url */,
|
| + string16 /* database name */,
|
| + string16 /* database display name */,
|
| + unsigned long /* estimated size */,
|
| + bool /* result */)
|
|
|
| //-----------------------------------------------------------------------------
|
| // Worker messages
|
| // These are messages sent from the renderer process to the worker process.
|
| -IPC_BEGIN_MESSAGES(Worker)
|
| - IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext,
|
| - GURL /* url */,
|
| - string16 /* user_agent */,
|
| - string16 /* source_code */)
|
| +IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext,
|
| + GURL /* url */,
|
| + string16 /* user_agent */,
|
| + string16 /* source_code */)
|
|
|
| - IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext)
|
| +IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext)
|
|
|
| - IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage,
|
| - string16 /* message */,
|
| - std::vector<int> /* sent_message_port_ids */,
|
| - std::vector<int> /* new_routing_ids */)
|
| +IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage,
|
| + string16 /* message */,
|
| + std::vector<int> /* sent_message_port_ids */,
|
| + std::vector<int> /* new_routing_ids */)
|
|
|
| - IPC_MESSAGE_ROUTED2(WorkerMsg_Connect,
|
| - int /* sent_message_port_id */,
|
| - int /* routing_id */)
|
| +IPC_MESSAGE_ROUTED2(WorkerMsg_Connect,
|
| + int /* sent_message_port_id */,
|
| + int /* routing_id */)
|
|
|
| - IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed)
|
| -IPC_END_MESSAGES(Worker)
|
| +IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed)
|
|
|
|
|
| //-----------------------------------------------------------------------------
|
| // WorkerHost messages
|
| // These are messages sent from the worker process to the renderer process.
|
| -IPC_BEGIN_MESSAGES(WorkerHost)
|
| - // WorkerMsg_PostMessage is also sent here.
|
| - IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject,
|
| - string16 /* error_message */,
|
| - int /* line_number */,
|
| - string16 /* source_url*/)
|
| +// WorkerMsg_PostMessage is also sent here.
|
| +IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject,
|
| + string16 /* error_message */,
|
| + int /* line_number */,
|
| + string16 /* source_url*/)
|
|
|
| - IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject,
|
| - WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
|
| +IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject,
|
| + WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
|
|
|
| - IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject,
|
| - bool /* bool has_pending_activity */)
|
| +IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject,
|
| + bool /* bool has_pending_activity */)
|
|
|
| - IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity,
|
| - bool /* bool has_pending_activity */)
|
| +IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity,
|
| + bool /* bool has_pending_activity */)
|
|
|
| - IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed,
|
| - int /* worker_route_id */)
|
| - IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed)
|
| -IPC_END_MESSAGES(WorkerHost)
|
| +IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed,
|
| + int /* worker_route_id */)
|
| +IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed)
|
|
|