X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fppapi%2Fnative_client%2Fsrc%2Ftrusted%2Fplugin%2Fpnacl_resources.h;h=c0f29688a3c08e6f086707a4a346dfa4ab975660;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=cca3b5443a8bbdbc97929054f36f8b3fe7d657e9;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ppapi/native_client/src/trusted/plugin/pnacl_resources.h b/src/ppapi/native_client/src/trusted/plugin/pnacl_resources.h index cca3b54..c0f2968 100644 --- a/src/ppapi/native_client/src/trusted/plugin/pnacl_resources.h +++ b/src/ppapi/native_client/src/trusted/plugin/pnacl_resources.h @@ -12,7 +12,7 @@ #include "native_client/src/include/nacl_string.h" #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" -#include "ppapi/c/private/pp_file_handle.h" +#include "ppapi/c/private/ppb_nacl_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/native_client/src/trusted/plugin/plugin_error.h" @@ -26,27 +26,21 @@ class Plugin; // and point to pnacl component filesystem resources. class PnaclResources { public: - explicit PnaclResources(Plugin* plugin) - : plugin_(plugin), - llc_file_handle_(PP_kInvalidFileHandle), - ld_file_handle_(PP_kInvalidFileHandle) { - } + explicit PnaclResources(Plugin* plugin); virtual ~PnaclResources(); // Read the resource info JSON file. This is the first step after // construction; it has to be completed before StartLoad is called. - virtual void ReadResourceInfo( - const pp::CompletionCallback& resource_info_read_cb); + bool ReadResourceInfo(); // Start loading the resources. - virtual void StartLoad( - const pp::CompletionCallback& all_loaded_callback); + bool StartLoad(); const nacl::string& GetLlcUrl() { return llc_tool_name_; } const nacl::string& GetLdUrl() { return ld_tool_name_; } - PP_FileHandle TakeLlcFileHandle(); - PP_FileHandle TakeLdFileHandle(); + PP_NaClFileInfo TakeLlcFileInfo(); + PP_NaClFileInfo TakeLdFileInfo(); private: NACL_DISALLOW_COPY_AND_ASSIGN(PnaclResources); @@ -58,12 +52,12 @@ class PnaclResources { nacl::string llc_tool_name_; nacl::string ld_tool_name_; - // File handles for llc and ld executables, after they've been opened. + // File info for llc and ld executables, after they've been opened. // Only valid after the callback for StartLoad() has been called, and until - // TakeLlcFileHandle()/TakeLdFileHandle() is called. - PP_FileHandle llc_file_handle_; - PP_FileHandle ld_file_handle_; + // TakeLlcFileInfo()/TakeLdFileInfo() is called. + PP_NaClFileInfo llc_file_info_; + PP_NaClFileInfo ld_file_info_; }; -} // namespace plugin; +} // namespace plugin #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_