Index: ppapi/native_client/src/trusted/plugin/pnacl_resources.h |
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_resources.h b/ppapi/native_client/src/trusted/plugin/pnacl_resources.h |
index 5f1ca972e13e56bdda79e57cf016bc16901534a1..37b129431d66060b2719637efebadf98b5c013b2 100644 |
--- a/ppapi/native_client/src/trusted/plugin/pnacl_resources.h |
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_resources.h |
@@ -15,7 +15,9 @@ |
#include "native_client/src/trusted/plugin/delayed_callback.h" |
#include "native_client/src/trusted/plugin/nexe_arch.h" |
#include "native_client/src/trusted/plugin/plugin_error.h" |
+ |
#include "ppapi/utility/completion_callback_factory.h" |
+#include "ppapi/c/private/pp_file_handle.h" |
namespace plugin { |
@@ -23,21 +25,25 @@ class Manifest; |
class Plugin; |
class PnaclCoordinator; |
+// Constants for loading LLC and LD. |
class PnaclUrls { |
public: |
- static nacl::string GetExtensionUrl() { |
- return nacl::string(kExtensionOrigin) + GetSandboxISA() + "/"; |
- } |
+ static bool UsePnaclExtension(const Plugin* plugin); |
+ static nacl::string GetBaseUrl(bool use_extension); |
+ static bool IsPnaclComponent(const nacl::string& full_url); |
+ static nacl::string StripPnaclComponentPrefix(const nacl::string& full_url); |
static const nacl::string GetLlcUrl() { return nacl::string(kLlcUrl); } |
static const nacl::string GetLdUrl() { return nacl::string(kLdUrl); } |
private: |
static const char kExtensionOrigin[]; |
+ static const char kPnaclComponentID[]; |
static const char kLlcUrl[]; |
static const char kLdUrl[]; |
}; |
-// Loads a list of remote resources, providing a way to get file descriptors for |
-// thse resources. All URLs in relative to resource_base_url_. |
+// Loads a list of resources, providing a way to get file descriptors |
+// these resources. URLs for resources are resolved by the manifest |
robertm
2012/08/08 21:51:11
some typo
jvoung - send to chromium...
2012/08/08 22:47:04
Done.
|
+// and may point to filesystem resources. |
class PnaclResources { |
public: |
PnaclResources(Plugin* plugin, |
@@ -52,17 +58,17 @@ class PnaclResources { |
all_loaded_callback_(all_loaded_callback) { |
callback_factory_.Initialize(this); |
} |
- |
virtual ~PnaclResources(); |
- // Start fetching the URLs. After construction, this is the first step. |
- void StartDownloads(); |
- // Get the wrapper for the downloaded resource. |
- // Only valid after all_loaded_callback_ has been run. |
+ // Start loading the resources. After construction, this is the first step. |
+ virtual void StartLoad(); |
+ // Get file descs by name. Only valid after all_loaded_callback_ has been run. |
robertm
2012/08/08 21:51:11
would CHECK( resource_wrappers_.size() != 0)
be to
jvoung - send to chromium...
2012/08/08 22:47:04
Probably good to know. Could also/instead check t
|
nacl::DescWrapper* WrapperForUrl(const nacl::string& url) { |
return resource_wrappers_[url]; |
} |
+ static int32_t GetPnaclFD(Plugin* plugin, const char* filename); |
+ |
private: |
NACL_DISALLOW_COPY_AND_ASSIGN(PnaclResources); |