summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_file_ref.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_file_ref.h')
-rw-r--r--webkit/glue/plugins/pepper_file_ref.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/webkit/glue/plugins/pepper_file_ref.h b/webkit/glue/plugins/pepper_file_ref.h
index 0ab0e65..4dd8826 100644
--- a/webkit/glue/plugins/pepper_file_ref.h
+++ b/webkit/glue/plugins/pepper_file_ref.h
@@ -13,14 +13,16 @@
namespace pepper {
+class FileSystem;
+class PluginInstance;
class PluginModule;
class FileRef : public Resource {
public:
+ FileRef();
FileRef(PluginModule* module,
- PP_FileSystemType_Dev file_system_type,
- const std::string& validated_path,
- const std::string& origin);
+ scoped_refptr<FileSystem> file_system,
+ const std::string& validated_path);
FileRef(PluginModule* module,
const FilePath& external_file_path);
virtual ~FileRef();
@@ -36,28 +38,23 @@ class FileRef : public Resource {
std::string GetName() const;
scoped_refptr<FileRef> GetParent();
- PP_FileSystemType_Dev file_system_type() const { return fs_type_; }
+ // Returns the file system to which this FileRef belongs.
+ scoped_refptr<FileSystem> GetFileSystem() const;
+
+ // Returns the type of the file system to which this FileRef belongs.
+ PP_FileSystemType_Dev GetFileSystemType() const;
// Returns the virtual path (i.e., the path that the pepper plugin sees)
// corresponding to this file.
- const std::string& path() const { return path_; }
+ std::string GetPath() const;
// Returns the system path corresponding to this file.
- const FilePath& system_path() const { return system_path_; }
-
- // Returns a FileRef instance pointing to a file that should not be
- // accessible by the plugin. Should be used for testing only.
- static FileRef* GetInaccessibleFileRef(PluginModule* module);
-
- // Returns a FileRef instance pointing to a nonexistent file.
- // Should be used for testing only.
- static FileRef* GetNonexistentFileRef(PluginModule* module);
+ FilePath GetSystemPath() const;
private:
+ scoped_refptr<FileSystem> file_system_;
+ std::string virtual_path_; // UTF-8 encoded
FilePath system_path_;
- PP_FileSystemType_Dev fs_type_;
- std::string path_; // UTF-8 encoded.
- std::string origin_;
};
} // namespace pepper