| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 // The returned object will have a refcount of 0 (just like "new"). | 31 // The returned object will have a refcount of 0 (just like "new"). |
| 32 static PPB_FileRef_Impl* CreateInternal(PP_Resource pp_file_system, | 32 static PPB_FileRef_Impl* CreateInternal(PP_Resource pp_file_system, |
| 33 const std::string& path); | 33 const std::string& path); |
| 34 | 34 |
| 35 // The returned object will have a refcount of 0 (just like "new"). | 35 // The returned object will have a refcount of 0 (just like "new"). |
| 36 static PPB_FileRef_Impl* CreateExternal(PP_Instance instance, | 36 static PPB_FileRef_Impl* CreateExternal(PP_Instance instance, |
| 37 const FilePath& external_file_path); | 37 const FilePath& external_file_path); |
| 38 | 38 |
| 39 // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). | 39 // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). |
| 40 virtual PP_Resource GetParent() OVERRIDE; | 40 virtual PP_Resource GetParent() OVERRIDE; |
| 41 virtual int32_t MakeDirectory(PP_Bool make_ancestors, | 41 virtual int32_t MakeDirectory( |
| 42 PP_CompletionCallback callback) OVERRIDE; | 42 PP_Bool make_ancestors, |
| 43 virtual int32_t Touch(PP_Time last_access_time, | 43 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 44 PP_Time last_modified_time, | 44 virtual int32_t Touch( |
| 45 PP_CompletionCallback callback) OVERRIDE; | 45 PP_Time last_access_time, |
| 46 virtual int32_t Delete(PP_CompletionCallback callback) OVERRIDE; | 46 PP_Time last_modified_time, |
| 47 virtual int32_t Rename(PP_Resource new_file_ref, | 47 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 48 PP_CompletionCallback callback) OVERRIDE; | 48 virtual int32_t Delete( |
| 49 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 50 virtual int32_t Rename( |
| 51 PP_Resource new_file_ref, |
| 52 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 49 virtual PP_Var GetAbsolutePath(); | 53 virtual PP_Var GetAbsolutePath(); |
| 50 | 54 |
| 51 PPB_FileSystem_Impl* file_system() const { return file_system_.get(); } | 55 PPB_FileSystem_Impl* file_system() const { return file_system_.get(); } |
| 52 | 56 |
| 53 // Returns the system path corresponding to this file. Valid only for | 57 // Returns the system path corresponding to this file. Valid only for |
| 54 // external filesystems. | 58 // external filesystems. |
| 55 FilePath GetSystemPath() const; | 59 FilePath GetSystemPath() const; |
| 56 | 60 |
| 57 // Returns the FileSystem API URL corresponding to this file. | 61 // Returns the FileSystem API URL corresponding to this file. |
| 58 GURL GetFileSystemURL() const; | 62 GURL GetFileSystemURL() const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 75 // return the identical string object every time it is requested. | 79 // return the identical string object every time it is requested. |
| 76 scoped_refptr<StringVar> external_path_var_; | 80 scoped_refptr<StringVar> external_path_var_; |
| 77 | 81 |
| 78 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); | 82 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); |
| 79 }; | 83 }; |
| 80 | 84 |
| 81 } // namespace ppapi | 85 } // namespace ppapi |
| 82 } // namespace webkit | 86 } // namespace webkit |
| 83 | 87 |
| 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ | 88 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ |
| OLD | NEW |