| 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 244c824b94f28aeef2b940a0066d3770c41a24be..a92ba142e13dbb9ed5094a80f18b8a3c98b29235 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_;
|
|
|
|
|