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

Unified Diff: chrome/browser/nacl_host/nacl_file_host.h

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: const ref Created 7 years, 5 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_file_host.h
diff --git a/chrome/browser/nacl_host/nacl_file_host.h b/chrome/browser/nacl_host/nacl_file_host.h
index ee473cc3de0ab941e04f8a1b238a1ae3f4a9cade..2f1284e9eeb79aeb78a6c25932d955184edd759a 100644
--- a/chrome/browser/nacl_host/nacl_file_host.h
+++ b/chrome/browser/nacl_host/nacl_file_host.h
@@ -25,8 +25,19 @@ class Message;
// Opens NaCl Files in the Browser process, on behalf of the NaCl plugin.
namespace nacl_file_host {
-
-// Open a Pnacl file (readonly) on behalf of the NaCl plugin.
+typedef base::Callback<void(bool)> InstallCallback;
+typedef base::Callback<void(int64_t, int64_t)> InstallProgressCallback;
+
+// Ensure that PNaCl is installed. Calls |done_callback| if PNaCl is already
+// installed. Otherwise, issues a request to install and calls |done_callback|
+// after that request completes w/ success or failure.
+// If an request to install is issued, then |progress_callback| is called
+// with progress updates.
+void EnsurePnaclInstalled(
+ const InstallCallback& done_callback,
+ const InstallProgressCallback& progress_callback);
+
+// Open a PNaCl file (readonly) on behalf of the NaCl plugin.
void GetReadonlyPnaclFd(
scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter,
const std::string& filename,

Powered by Google App Engine
This is Rietveld 408576698