Home | History | Annotate | Download | only in common
      1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Defines messages between the browser and NaCl process.
      6 
      7 // Multiply-included message file, no traditional include guard.
      8 #include "base/process.h"
      9 #include "chrome/common/nacl_types.h"
     10 #include "ipc/ipc_message_macros.h"
     11 
     12 #ifndef CHROME_COMMON_NACL_MESSAGES_H_
     13 #define CHROME_COMMON_NACL_MESSAGES_H_
     14 
     15 #endif  // CHROME_COMMON_NACL_MESSAGES_H_
     16 
     17 #define IPC_MESSAGE_START NaClMsgStart
     18 
     19 //-----------------------------------------------------------------------------
     20 // NaClProcess messages
     21 // These are messages sent from the browser to the NaCl process.
     22 // Tells the NaCl process to start.
     23 IPC_MESSAGE_CONTROL1(NaClProcessMsg_Start,
     24                      std::vector<nacl::FileDescriptor> /* sockets */)
     25 
     26 // Tells the NaCl broker to launch a NaCl loader process.
     27 IPC_MESSAGE_CONTROL1(NaClProcessMsg_LaunchLoaderThroughBroker,
     28                      std::wstring /* channel ID for the loader */)
     29 
     30 // Notify the browser process that the loader was launched successfully.
     31 IPC_MESSAGE_CONTROL2(NaClProcessMsg_LoaderLaunched,
     32                      std::wstring,  /* channel ID for the loader */
     33                      base::ProcessHandle /* loader process handle */)
     34 
     35 // Notify the broker that all loader processes have been terminated and it
     36 // should shutdown.
     37 IPC_MESSAGE_CONTROL0(NaClProcessMsg_StopBroker)
     38 
     39