| Index: components/nacl/browser/nacl_process_host.h
|
| diff --git a/components/nacl/browser/nacl_process_host.h b/components/nacl/browser/nacl_process_host.h
|
| index d3fd57aaa9a3e3daf5e8f672573acd64b82a41cb..480cdbfbd92ee706ac50450ae9d8d623f7ae4e33 100644
|
| --- a/components/nacl/browser/nacl_process_host.h
|
| +++ b/components/nacl/browser/nacl_process_host.h
|
| @@ -21,6 +21,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/process/process.h"
|
| +#include "components/nacl/common/nacl.mojom.h"
|
| #include "components/nacl/common/nacl_types.h"
|
| #include "content/public/browser/browser_child_process_host_delegate.h"
|
| #include "content/public/browser/browser_child_process_host_iterator.h"
|
| @@ -51,7 +52,6 @@ struct NaClFileToken {
|
| uint64_t hi;
|
| };
|
|
|
| -class NaClHostMessageFilter;
|
| void* AllocateAddressSpaceASLR(base::ProcessHandle process, size_t size);
|
|
|
| // Represents the browser side of the browser <--> NaCl communication
|
| @@ -80,6 +80,7 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
| const NaClFileToken& nexe_token,
|
| const std::vector<NaClResourcePrefetchResult>& prefetched_resource_files,
|
| ppapi::PpapiPermissions permissions,
|
| + int render_process_id,
|
| int render_view_id,
|
| uint32_t permission_bits,
|
| bool uses_nonsfi_mode,
|
| @@ -101,11 +102,9 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
| // Specifies throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs.
|
| static void SetPpapiKeepAliveThrottleForTesting(unsigned milliseconds);
|
|
|
| - // Initialize the new NaCl process. Result is returned by sending ipc
|
| - // message reply_msg.
|
| - void Launch(NaClHostMessageFilter* nacl_host_message_filter,
|
| - IPC::Message* reply_msg,
|
| - const base::FilePath& manifest_path);
|
| + // Initialize the new NaCl process. Result is returned via |callback|.
|
| + void Launch(const base::FilePath& manifest_path,
|
| + const mojom::NaClHost::LaunchNaClCallback& callback);
|
|
|
| void OnChannelConnected(int32_t peer_pid) override;
|
|
|
| @@ -158,7 +157,7 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
|
|
| // Sends the reply message to the renderer. Either result or
|
| // error message must be empty.
|
| - void SendMessageToRenderer(const NaClLaunchResult& result,
|
| + void SendMessageToRenderer(mojom::NaClLaunchResultPtr result,
|
| const std::string& error_message);
|
|
|
| // Sends the message to the NaCl process to load the plugin. Returns true
|
| @@ -215,14 +214,10 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
| // the NaCl loader.
|
| bool process_launched_by_broker_;
|
| #endif
|
| - // The NaClHostMessageFilter that requested this NaCl process. We use
|
| - // this for sending the reply once the process has started.
|
| - scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter_;
|
| -
|
| - // The reply message to send. We must always send this message when the
|
| - // sub-process either succeeds or fails to unblock the renderer waiting for
|
| - // the reply. NULL when there is no reply to send.
|
| - IPC::Message* reply_msg_;
|
| +
|
| + // The result callback. We must always call this callback when the sub-process
|
| + // either succeeds or fails to unblock the renderer waiting for the reply.
|
| + mojom::NaClHost::LaunchNaClCallback launch_callback_;
|
| #if defined(OS_WIN)
|
| bool debug_exception_handler_requested_;
|
| std::unique_ptr<IPC::Message> attach_debug_exception_handler_reply_msg_;
|
| @@ -238,8 +233,8 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
|
|
| bool enable_debug_stub_;
|
| bool enable_crash_throttling_;
|
| - bool off_the_record_;
|
| - NaClAppProcessType process_type_;
|
| + const bool off_the_record_;
|
| + const NaClAppProcessType process_type_;
|
|
|
| const base::FilePath profile_directory_;
|
|
|
| @@ -248,7 +243,8 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
|
| // Browser host for plugin process.
|
| std::unique_ptr<content::BrowserPpapiHost> ppapi_host_;
|
|
|
| - int render_view_id_;
|
| + const int render_process_id_;
|
| + const int render_view_id_;
|
|
|
| // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs.
|
| static unsigned keepalive_throttle_interval_milliseconds_;
|
|
|