| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PROXY_FILE_REF_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_FILE_REF_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_FILE_REF_RESOURCE_H_ | 6 #define PPAPI_PROXY_FILE_REF_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace proxy { | 24 namespace proxy { |
| 25 | 25 |
| 26 class PPAPI_PROXY_EXPORT FileRefResource | 26 class PPAPI_PROXY_EXPORT FileRefResource |
| 27 : public PluginResource, | 27 : public PluginResource, |
| 28 public thunk::PPB_FileRef_API { | 28 public thunk::PPB_FileRef_API { |
| 29 public: | 29 public: |
| 30 static PP_Resource CreateFileRef(Connection connection, | 30 static PP_Resource CreateFileRef(Connection connection, |
| 31 PP_Instance instance, | 31 PP_Instance instance, |
| 32 const FileRefCreateInfo& info); | 32 const FileRefCreateInfo& info); |
| 33 | 33 |
| 34 virtual ~FileRefResource(); | 34 ~FileRefResource() override; |
| 35 | 35 |
| 36 // Resource implementation. | 36 // Resource implementation. |
| 37 virtual thunk::PPB_FileRef_API* AsPPB_FileRef_API() override; | 37 thunk::PPB_FileRef_API* AsPPB_FileRef_API() override; |
| 38 | 38 |
| 39 // PPB_FileRef_API implementation. | 39 // PPB_FileRef_API implementation. |
| 40 virtual PP_FileSystemType GetFileSystemType() const override; | 40 PP_FileSystemType GetFileSystemType() const override; |
| 41 virtual PP_Var GetName() const override; | 41 PP_Var GetName() const override; |
| 42 virtual PP_Var GetPath() const override; | 42 PP_Var GetPath() const override; |
| 43 virtual PP_Resource GetParent() override; | 43 PP_Resource GetParent() override; |
| 44 virtual int32_t MakeDirectory( | 44 int32_t MakeDirectory(int32_t make_directory_flags, |
| 45 int32_t make_directory_flags, | |
| 46 scoped_refptr<TrackedCallback> callback) override; | |
| 47 virtual int32_t Touch(PP_Time last_access_time, | |
| 48 PP_Time last_modified_time, | |
| 49 scoped_refptr<TrackedCallback> callback) override; | 45 scoped_refptr<TrackedCallback> callback) override; |
| 50 virtual int32_t Delete(scoped_refptr<TrackedCallback> callback) override; | 46 int32_t Touch(PP_Time last_access_time, |
| 51 virtual int32_t Rename(PP_Resource new_file_ref, | 47 PP_Time last_modified_time, |
| 52 scoped_refptr<TrackedCallback> callback) override; | 48 scoped_refptr<TrackedCallback> callback) override; |
| 53 virtual int32_t Query(PP_FileInfo* info, | 49 int32_t Delete(scoped_refptr<TrackedCallback> callback) override; |
| 54 scoped_refptr<TrackedCallback> callback) override; | 50 int32_t Rename(PP_Resource new_file_ref, |
| 55 virtual int32_t ReadDirectoryEntries( | 51 scoped_refptr<TrackedCallback> callback) override; |
| 52 int32_t Query(PP_FileInfo* info, |
| 53 scoped_refptr<TrackedCallback> callback) override; |
| 54 int32_t ReadDirectoryEntries( |
| 56 const PP_ArrayOutput& output, | 55 const PP_ArrayOutput& output, |
| 57 scoped_refptr<TrackedCallback> callback) override; | 56 scoped_refptr<TrackedCallback> callback) override; |
| 58 virtual const FileRefCreateInfo& GetCreateInfo() const override; | 57 const FileRefCreateInfo& GetCreateInfo() const override; |
| 59 | 58 |
| 60 // Private API | 59 // Private API |
| 61 virtual PP_Var GetAbsolutePath() override; | 60 PP_Var GetAbsolutePath() override; |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 FileRefResource(Connection connection, | 63 FileRefResource(Connection connection, |
| 65 PP_Instance instance, | 64 PP_Instance instance, |
| 66 const FileRefCreateInfo& info); | 65 const FileRefCreateInfo& info); |
| 67 | 66 |
| 68 void RunTrackedCallback(scoped_refptr<TrackedCallback> callback, | 67 void RunTrackedCallback(scoped_refptr<TrackedCallback> callback, |
| 69 const ResourceMessageReplyParams& params); | 68 const ResourceMessageReplyParams& params); |
| 70 | 69 |
| 71 void OnQueryReply(PP_FileInfo* out_info, | 70 void OnQueryReply(PP_FileInfo* out_info, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 94 scoped_refptr<StringVar> path_var_; | 93 scoped_refptr<StringVar> path_var_; |
| 95 scoped_refptr<StringVar> absolute_path_var_; | 94 scoped_refptr<StringVar> absolute_path_var_; |
| 96 | 95 |
| 97 DISALLOW_COPY_AND_ASSIGN(FileRefResource); | 96 DISALLOW_COPY_AND_ASSIGN(FileRefResource); |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 } // namespace proxy | 99 } // namespace proxy |
| 101 } // namespace ppapi | 100 } // namespace ppapi |
| 102 | 101 |
| 103 #endif // PPAPI_PROXY_FILE_REF_RESOURCE_H_ | 102 #endif // PPAPI_PROXY_FILE_REF_RESOURCE_H_ |
| OLD | NEW |