Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.h

Issue 294633003: Pepper: Move StreamAsFile out of trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for bbudge Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/file_downloader.cc ('k') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698