content/ppapi_plugin/ppapi_thread.cc
// The "regular" ChildThread implements this function and does some standard
// dispatching, then uses the message router. We don't actually need any of
// this so this function just overrides that one.
//
// Note that this function is called only for messages from the channel to the
// browser process. Messages from the renderer process are sent via a different
// channel that ends up at Dispatcher::OnMessageReceived.
The "regular" ChildThread implements this function and does some standard
dispatching, then uses the message router. We don't actually need any of
this so this function just overrides that one.

Note that this function is called only for messages from the channel to the
browser process. Messages from the renderer process are sent via a different
channel that ends up at Dispatcher::OnMessageReceived.
The " regular " ChildThread implements this function and does some standard dispatching then uses the message router . We don ' t actually need any of this so this function just overrides that one . Note that this function is called only for messages from the channel to the browser process . Messages from the renderer process are sent via a different channel that ends up at Dispatcher :: OnMessageReceived .
bool PpapiThread::OnMessageReceived(const IPC::Message& msg) {
  IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg)
    IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin)
    IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel)
    IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnMsgResourceReply)
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPServerSocket_ListenACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPServerSocket_AcceptACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ConnectACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_SSLHandshakeACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBNetworkMonitor_NetworkList,
                                OnPluginDispatcherMessageReceived(msg))
    IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState)
  IPC_END_MESSAGE_MAP()
  return true;
}
bool PpapiThread :: OnMessageReceived ( const IPC :: Message & msg ) { IPC_BEGIN_MESSAGE_MAP ( PpapiThread , msg ) IPC_MESSAGE_HANDLER ( PpapiMsg_LoadPlugin , OnMsgLoadPlugin ) IPC_MESSAGE_HANDLER ( PpapiMsg_CreateChannel , OnMsgCreateChannel ) IPC_MESSAGE_HANDLER ( PpapiPluginMsg_ResourceReply , OnMsgResourceReply ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPServerSocket_ListenACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPServerSocket_AcceptACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPSocket_ConnectACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPSocket_SSLHandshakeACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPSocket_ReadACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBTCPSocket_WriteACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBUDPSocket_RecvFromACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBUDPSocket_SendToACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBUDPSocket_BindACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBHostResolver_ResolveACK , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER_GENERIC ( PpapiMsg_PPBNetworkMonitor_NetworkList , OnPluginDispatcherMessageReceived ( msg ) ) IPC_MESSAGE_HANDLER ( PpapiMsg_SetNetworkState , OnMsgSetNetworkState ) IPC_END_MESSAGE_MAP ( ) return true ; }
The "regular" ChildThread implements this function and does some standard
dispatching, then uses the message router.
The " regular " ChildThread implements this function and does some standard dispatching then uses the message router .