diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 22:16:43 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 22:16:43 +0000 |
commit | 60accc164fc11eb2b146cfaf009152ee1017d64b (patch) | |
tree | 9d9c151f06def929f5661e2d728a2a03a000eb96 /ppapi/cpp/file_system.h | |
parent | ec66d1efde8f062599447c1b74b656ac5449fd5d (diff) | |
download | chromium_src-60accc164fc11eb2b146cfaf009152ee1017d64b.zip chromium_src-60accc164fc11eb2b146cfaf009152ee1017d64b.tar.gz chromium_src-60accc164fc11eb2b146cfaf009152ee1017d64b.tar.bz2 |
[PPAPI] Added pp::VarResource_Dev class.
This is a C++ wrapper for the C API PPB_VarResource_Dev.
Also added methods to pp::FileSystem for converting a pp::Resource to a
pp::FileSystem, which are necessary for making use of a resource
extracted using pp::VarResource_Dev.
(Committed by yzshen@chromium.org on behalf of mgiuca@chromium.org)
BUG=177017
R=dmichael@chromium.org, noelallen@chromium.org, noelallen@google.com, yzshen@chromium.org
Review URL: https://codereview.chromium.org/52233002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/file_system.h')
-rw-r--r-- | ppapi/cpp/file_system.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ppapi/cpp/file_system.h b/ppapi/cpp/file_system.h index 9baa78e..96e88c1 100644 --- a/ppapi/cpp/file_system.h +++ b/ppapi/cpp/file_system.h @@ -33,6 +33,11 @@ class FileSystem : public Resource { /// @param[in] other A reference to a <code>FileSystem</code>. FileSystem(const FileSystem& other); + /// Constructs a <code>FileSystem</code> from a <code>Resource</code>. + /// + /// @param[in] resource A <code>Resource</code> containing a file system. + explicit FileSystem(const Resource& resource); + /// A constructor used when you have received a PP_Resource as a return /// value that has already been reference counted. /// @@ -63,6 +68,14 @@ class FileSystem : public Resource { /// /// @return An int32_t containing an error code from <code>pp_errors.h</code>. int32_t Open(int64_t expected_size, const CompletionCallback& cc); + + /// Checks whether a <code>Resource</code> is a file system, to test whether + /// it is appropriate for use with the <code>FileSystem</code> constructor. + /// + /// @param[in] resource A <code>Resource</code> to test. + /// + /// @return True if <code>resource</code> is a file system. + static bool IsFileSystem(const Resource& resource); }; } // namespace pp |