Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5299)

Unified Diff: chrome/browser/nacl_host/nacl_host_message_filter.cc

Issue 19863003: PNaCl on-demand installs: Make a separate async IPC to check if PNaCl is installed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: take out progress IPC for now Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « chrome/browser/nacl_host/nacl_host_message_filter.h ('k') | chrome/renderer/pepper/pnacl_translation_resource_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698