Index: chrome/browser/nacl_host/nacl_host_message_filter.cc |
diff --git a/chrome/browser/nacl_host/nacl_host_message_filter.cc b/chrome/browser/nacl_host/nacl_host_message_filter.cc |
index b408a17065d968e16c31e5e22464374ac8a3e48f..5980d728a66b0a07de6940d232c22c3f04e70dc8 100644 |
--- a/chrome/browser/nacl_host/nacl_host_message_filter.cc |
+++ b/chrome/browser/nacl_host/nacl_host_message_filter.cc |
@@ -56,6 +56,8 @@ bool NaClHostMessageFilter::OnMessageReceived(const IPC::Message& message, |
IPC_BEGIN_MESSAGE_MAP_EX(NaClHostMessageFilter, message, *message_was_ok) |
#if !defined(DISABLE_NACL) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_LaunchNaCl, OnLaunchNaCl) |
+ IPC_MESSAGE_HANDLER(NaClHostMsg_EnsurePnaclInstalled, |
+ OnEnsurePnaclInstalled) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_GetReadonlyPnaclFD, |
OnGetReadonlyPnaclFd) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_NaClCreateTemporaryFile, |
@@ -96,6 +98,27 @@ void NaClHostMessageFilter::OnLaunchNaCl( |
host->Launch(this, reply_msg, manifest_url); |
} |
+void NaClHostMessageFilter::ReplyEnsurePnaclInstalled( |
+ int instance, |
+ bool success) { |
+ Send(new NaClViewMsg_EnsurePnaclInstalledReply(instance, success)); |
+} |
+ |
+void NaClHostMessageFilter::SendProgressEnsurePnaclInstalled( |
+ int instance, |
+ const nacl::PnaclInstallProgress& progress) { |
+ // TODO(jvoung): actually send an IPC. |
+} |
+ |
+void NaClHostMessageFilter::OnEnsurePnaclInstalled( |
+ int instance) { |
+ nacl_file_host::EnsurePnaclInstalled( |
+ base::Bind(&NaClHostMessageFilter::ReplyEnsurePnaclInstalled, |
+ this, instance), |
+ base::Bind(&NaClHostMessageFilter::SendProgressEnsurePnaclInstalled, |
+ this, instance)); |
+} |
+ |
void NaClHostMessageFilter::OnGetReadonlyPnaclFd( |
const std::string& filename, IPC::Message* reply_msg) { |
// This posts a task to another thread, but the renderer will |