| Index: chrome/browser/nacl_host/nacl_process_host.h | 
| =================================================================== | 
| --- chrome/browser/nacl_host/nacl_process_host.h	(revision 154143) | 
| +++ chrome/browser/nacl_host/nacl_process_host.h	(working copy) | 
| @@ -26,6 +26,10 @@ | 
| class BrowserChildProcessHost; | 
| } | 
|  | 
| +namespace IPC { | 
| +class ChannelProxy; | 
| +} | 
| + | 
| // Represents the browser side of the browser <--> NaCl communication | 
| // channel. There will be one NaClProcessHost per NaCl process | 
| // The browser is responsible for starting the NaCl process | 
| @@ -60,12 +64,25 @@ | 
| bool Send(IPC::Message* msg); | 
|  | 
| private: | 
| +  friend class PluginListener; | 
| + | 
| // Internal class that holds the nacl::Handle objecs so that | 
| // nacl_process_host.h doesn't include NaCl headers.  Needed since it's | 
| // included by src\content, which can't depend on the NaCl gyp file because it | 
| // depends on chrome.gyp (circular dependency). | 
| struct NaClInternal; | 
|  | 
| +  // PluginListener that forwards any messages from untrusted code that aren't | 
| +  // handled by the PepperMessageFilter to us. | 
| +  class PluginListener : public IPC::Listener { | 
| +   public: | 
| +    explicit PluginListener(NaClProcessHost* host); | 
| +    virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 
| +   private: | 
| +    // Non-owning pointer so we can forward messages to the host. | 
| +    NaClProcessHost* host_; | 
| +  }; | 
| + | 
| #if defined(OS_WIN) | 
| // Create command line for launching loader under nacl-gdb. | 
| scoped_ptr<CommandLine> GetCommandForLaunchWithGdb(const FilePath& nacl_gdb, | 
| @@ -113,7 +130,11 @@ | 
| IPC::Message* reply_msg); | 
| #endif | 
|  | 
| +  // Called when a PPAPI IPC channel has been created. | 
| void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle); | 
| +  // Called by PluginListener, so messages from the untrusted side of | 
| +  // the IPC proxy can be handled. | 
| +  bool OnUntrustedMessageForwarded(const IPC::Message& msg); | 
|  | 
| GURL manifest_url_; | 
|  | 
| @@ -159,6 +180,11 @@ | 
|  | 
| bool enable_ipc_proxy_; | 
|  | 
| +  // Channel proxy to terminate the NaCl-Browser PPAPI channel. | 
| +  scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; | 
| +  // Plugin listener, to forward browser channel messages to us. | 
| +  PluginListener ipc_plugin_listener_; | 
| + | 
| DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 
| }; | 
|  | 
|  |