| Index: webkit/plugins/ppapi/ppb_file_ref_impl.h
|
| diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.h b/webkit/plugins/ppapi/ppb_file_ref_impl.h
|
| index a1856c0ce0f2607076936a43d8d2412fa9a19992..9f0cdbb70f40a7aa2e61f1844f4afc063751415f 100644
|
| --- a/webkit/plugins/ppapi/ppb_file_ref_impl.h
|
| +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.h
|
| @@ -8,7 +8,9 @@
|
| #include <string>
|
|
|
| #include "base/files/file_path.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "googleurl/src/gurl.h"
|
| +#include "ppapi/c/pp_file_info.h"
|
| #include "ppapi/c/ppb_file_ref.h"
|
| #include "ppapi/shared_impl/ppb_file_ref_shared.h"
|
| #include "ppapi/shared_impl/var.h"
|
| @@ -53,6 +55,9 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
|
| virtual int32_t Rename(
|
| PP_Resource new_file_ref,
|
| scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
|
| + virtual int32_t Query(
|
| + PP_FileInfo* info,
|
| + scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
|
| virtual PP_Var GetAbsolutePath();
|
|
|
| PPB_FileSystem_Impl* file_system() const { return file_system_.get(); }
|
| @@ -67,6 +72,15 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
|
| // Checks if file ref has file system instance and if the instance is opened.
|
| bool HasValidFileSystem() const;
|
| private:
|
| + void QueryCallback(PP_FileInfo* info,
|
| + scoped_refptr< ::ppapi::TrackedCallback> callback,
|
| + base::PlatformFileError error_code,
|
| + base::PassPlatformFile passed_file);
|
| + void GetFileInfoCallback(PP_FileInfo* info,
|
| + scoped_refptr< ::ppapi::TrackedCallback> callback,
|
| + base::PlatformFileError error_code,
|
| + const base::PlatformFileInfo& file_info);
|
| +
|
| // Many mutation functions are allow only to non-external filesystems, This
|
| // function returns true if the filesystem is opened and isn't external as an
|
| // access check for these functions.
|
| @@ -82,6 +96,10 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
|
| // return the identical string object every time it is requested.
|
| scoped_refptr<StringVar> external_path_var_;
|
|
|
| + // This class makes asynchronous calls to perform file operations to support
|
| + // Query().
|
| + base::WeakPtrFactory<PPB_FileRef_Impl> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl);
|
| };
|
|
|
|
|