OLD | NEW |
1 // Copyright (c) 2012 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" |
(...skipping 21 matching lines...) Expand all Loading... |
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 const std::string& display_name); | 38 const std::string& display_name); |
39 | 39 |
40 // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). | 40 // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). |
41 virtual PP_Resource GetParent() OVERRIDE; | 41 virtual PP_Resource GetParent() OVERRIDE; |
42 virtual int32_t MakeDirectory(PP_Bool make_ancestors, | 42 virtual int32_t MakeDirectory( |
43 PP_CompletionCallback callback) OVERRIDE; | 43 PP_Bool make_ancestors, |
44 virtual int32_t Touch(PP_Time last_access_time, | 44 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
45 PP_Time last_modified_time, | 45 virtual int32_t Touch( |
46 PP_CompletionCallback callback) OVERRIDE; | 46 PP_Time last_access_time, |
47 virtual int32_t Delete(PP_CompletionCallback callback) OVERRIDE; | 47 PP_Time last_modified_time, |
48 virtual int32_t Rename(PP_Resource new_file_ref, | 48 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
49 PP_CompletionCallback callback) OVERRIDE; | 49 virtual int32_t Delete( |
| 50 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 51 virtual int32_t Rename( |
| 52 PP_Resource new_file_ref, |
| 53 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
50 virtual PP_Var GetAbsolutePath(); | 54 virtual PP_Var GetAbsolutePath(); |
51 | 55 |
52 PPB_FileSystem_Impl* file_system() const { return file_system_.get(); } | 56 PPB_FileSystem_Impl* file_system() const { return file_system_.get(); } |
53 | 57 |
54 // Returns the system path corresponding to this file. Valid only for | 58 // Returns the system path corresponding to this file. Valid only for |
55 // external filesystems. | 59 // external filesystems. |
56 FilePath GetSystemPath() const; | 60 FilePath GetSystemPath() const; |
57 | 61 |
58 // Returns the FileSystem API URL corresponding to this file. | 62 // Returns the FileSystem API URL corresponding to this file. |
59 GURL GetFileSystemURL() const; | 63 GURL GetFileSystemURL() const; |
(...skipping 16 matching lines...) Expand all Loading... |
76 // return the identical string object every time it is requested. | 80 // return the identical string object every time it is requested. |
77 scoped_refptr<StringVar> external_path_var_; | 81 scoped_refptr<StringVar> external_path_var_; |
78 | 82 |
79 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); | 83 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); |
80 }; | 84 }; |
81 | 85 |
82 } // namespace ppapi | 86 } // namespace ppapi |
83 } // namespace webkit | 87 } // namespace webkit |
84 | 88 |
85 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ | 89 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ |
OLD | NEW |