Index: ppapi/native_client/src/trusted/plugin/plugin.h |
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.h b/ppapi/native_client/src/trusted/plugin/plugin.h |
index a2e0c020bd36e0c44a85ad529fba0481747a243c..9bec79ae8baa2c0ae9c05dfba3a650874c3bc5ee 100644 |
--- a/ppapi/native_client/src/trusted/plugin/plugin.h |
+++ b/ppapi/native_client/src/trusted/plugin/plugin.h |
@@ -50,6 +50,8 @@ namespace plugin { |
class ErrorInfo; |
class Manifest; |
+int32_t ConvertFileDescriptor(PP_FileHandle handle); |
+ |
class Plugin : public pp::Instance { |
public: |
explicit Plugin(PP_Instance instance); |
@@ -148,10 +150,11 @@ class Plugin : public pp::Instance { |
// event. |
void DispatchProgressEvent(int32_t result); |
- // Requests a URL asynchronously resulting in a call to pp_callback with |
- // a PP_Error indicating status. |
- bool StreamAsFile(const nacl::string& url, |
- NaClFileInfo *out_file_info, |
+ // Requests a URL asynchronously, resulting in a call to |callback| with |
+ // an error code indicating status. On success, writes file information to |
+ // |file_info|. |
+ void StreamAsFile(const nacl::string& url, |
+ PP_NaClFileInfo* file_info, |
const pp::CompletionCallback& callback); |
// A helper function that indicates if |url| can be requested by the document |
@@ -247,17 +250,6 @@ class Plugin : public pp::Instance { |
void HistogramStartupTimeSmall(const std::string& name, float dt); |
void HistogramStartupTimeMedium(const std::string& name, float dt); |
- // Callback used when loading a URL for SRPC-based StreamAsFile(). |
- void UrlDidOpenForStreamAsFile(int32_t pp_error, |
- FileDownloader* url_downloader, |
- NaClFileInfo* out_file_info, |
- pp::CompletionCallback pp_callback); |
- |
- // Open an app file by requesting a file descriptor from the browser. This |
- // method first checks that the url is for an installed file before making the |
- // request so it won't slow down non-installed file downloads. |
- bool OpenURLFast(const nacl::string& url, FileDownloader* downloader); |
- |
void SetExitStatusOnMainThread(int32_t pp_error, int exit_status); |
// Keep track of the NaCl module subprocess that was spun up in the plugin. |
@@ -274,23 +266,6 @@ class Plugin : public pp::Instance { |
nacl::scoped_ptr<PnaclCoordinator> pnacl_coordinator_; |
- // Keep track of the FileDownloaders created to fetch urls. |
- std::set<FileDownloader*> url_downloaders_; |
- |
- // Callback to receive .nexe and .dso download progress notifications. |
- static void UpdateDownloadProgress( |
- PP_Instance pp_instance, |
- PP_Resource pp_resource, |
- int64_t bytes_sent, |
- int64_t total_bytes_to_be_sent, |
- int64_t bytes_received, |
- int64_t total_bytes_to_be_received); |
- |
- // Finds the file downloader which owns the given URL loader. This is used |
- // in UpdateDownloadProgress to map a url loader back to the URL being |
- // downloaded. |
- const FileDownloader* FindFileDownloader(PP_Resource url_loader) const; |
- |
int64_t time_of_last_progress_event_; |
int exit_status_; |