| Index: chrome/renderer/pepper/pnacl_translation_resource_host.h
|
| diff --git a/chrome/renderer/pepper/pnacl_translation_resource_host.h b/chrome/renderer/pepper/pnacl_translation_resource_host.h
|
| index 41edcbf2d1d47cff4f7f0633e9738e31d1c419da..0ffe9231f22df4472b0a24b5c251b218bab1bed8 100644
|
| --- a/chrome/renderer/pepper/pnacl_translation_resource_host.h
|
| +++ b/chrome/renderer/pepper/pnacl_translation_resource_host.h
|
| @@ -31,6 +31,10 @@ class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
|
| scoped_refptr<ppapi::TrackedCallback> callback);
|
| void ReportTranslationFinished(PP_Instance instance);
|
|
|
| + // Ensure that PNaCl resources (pnacl-llc.nexe, linker, libs) are installed.
|
| + void EnsurePnaclInstalled(PP_Instance instance,
|
| + scoped_refptr<ppapi::TrackedCallback> callback);
|
| +
|
| protected:
|
| virtual ~PnaclTranslationResourceHost();
|
|
|
| @@ -51,6 +55,9 @@ class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
|
| // Maps the instance with an outstanding cache request to the info
|
| // about that request.
|
| typedef std::map<PP_Instance, CacheRequestInfo> CacheRequestInfoMap;
|
| + // Maps the instance to an outstanding ensure pnacl installed request.
|
| + typedef std::map<PP_Instance, scoped_refptr<ppapi::TrackedCallback> >
|
| + EnsurePnaclInstalledMap;
|
| // IPC::ChannelProxy::MessageFilter implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
|
| @@ -61,12 +68,19 @@ class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
|
| bool is_hit,
|
| IPC::PlatformFileForTransit file);
|
| void CleanupCacheRequests();
|
| + void OnEnsurePnaclInstalledReply(PP_Instance instance,
|
| + bool success);
|
| + void OnEnsurePnaclInstalledProgress(PP_Instance instance,
|
| + int64_t current_progress,
|
| + int64_t total);
|
| + void CleanupEnsurePnaclRequests();
|
|
|
| scoped_refptr<base::MessageLoopProxy> io_message_loop_;
|
| IPC::Channel* channel_;
|
|
|
| // Should be accessed on the io thread.
|
| CacheRequestInfoMap pending_cache_requests_;
|
| + EnsurePnaclInstalledMap pending_ensure_pnacl_requests_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost);
|
| };
|
|
|