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 #include <vector> |
9 | 10 |
10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/memory/linked_ptr.h" |
11 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
12 #include "ppapi/c/pp_file_info.h" | 14 #include "ppapi/c/pp_file_info.h" |
13 #include "ppapi/c/ppb_file_ref.h" | 15 #include "ppapi/c/ppb_file_ref.h" |
14 #include "ppapi/shared_impl/ppb_file_ref_shared.h" | 16 #include "ppapi/shared_impl/ppb_file_ref_shared.h" |
15 #include "ppapi/shared_impl/scoped_pp_resource.h" | 17 #include "ppapi/shared_impl/scoped_pp_resource.h" |
16 #include "ppapi/shared_impl/var.h" | 18 #include "ppapi/shared_impl/var.h" |
17 #include "webkit/glue/webkit_glue_export.h" | 19 #include "webkit/glue/webkit_glue_export.h" |
| 20 #include "webkit/plugins/ppapi/file_callbacks.h" |
18 | 21 |
19 namespace webkit { | 22 namespace webkit { |
20 namespace ppapi { | 23 namespace ppapi { |
21 | 24 |
22 using ::ppapi::StringVar; | 25 using ::ppapi::StringVar; |
23 | 26 |
24 class PPB_FileSystem_Impl; | 27 class PPB_FileSystem_Impl; |
25 | 28 |
26 class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl | 29 class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl |
27 : public ::ppapi::PPB_FileRef_Shared { | 30 : public ::ppapi::PPB_FileRef_Shared { |
(...skipping 25 matching lines...) Expand all Loading... |
53 PP_Time last_modified_time, | 56 PP_Time last_modified_time, |
54 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 57 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
55 virtual int32_t Delete( | 58 virtual int32_t Delete( |
56 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 59 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
57 virtual int32_t Rename( | 60 virtual int32_t Rename( |
58 PP_Resource new_file_ref, | 61 PP_Resource new_file_ref, |
59 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 62 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
60 virtual int32_t Query( | 63 virtual int32_t Query( |
61 PP_FileInfo* info, | 64 PP_FileInfo* info, |
62 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 65 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 66 virtual int32_t ReadDirectoryEntries( |
| 67 const PP_ArrayOutput& output, |
| 68 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 69 virtual int32_t QueryInHost( |
| 70 linked_ptr<PP_FileInfo> info, |
| 71 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 72 virtual int32_t ReadDirectoryEntriesInHost( |
| 73 linked_ptr<std::vector< ::ppapi::PPB_FileRef_CreateInfo> > files, |
| 74 linked_ptr<std::vector<PP_FileType> > file_types, |
| 75 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
63 virtual PP_Var GetAbsolutePath(); | 76 virtual PP_Var GetAbsolutePath(); |
64 | 77 |
65 PP_Resource file_system_resource() const { return file_system_; } | 78 PP_Resource file_system_resource() const { return file_system_; } |
66 | 79 |
67 // Returns the system path corresponding to this file. Valid only for | 80 // Returns the system path corresponding to this file. Valid only for |
68 // external filesystems. | 81 // external filesystems. |
69 base::FilePath GetSystemPath() const; | 82 base::FilePath GetSystemPath() const; |
70 | 83 |
71 // Returns the FileSystem API URL corresponding to this file. | 84 // Returns the FileSystem API URL corresponding to this file. |
72 GURL GetFileSystemURL() const; | 85 GURL GetFileSystemURL() const; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // return the identical string object every time it is requested. | 119 // return the identical string object every time it is requested. |
107 scoped_refptr<StringVar> external_path_var_; | 120 scoped_refptr<StringVar> external_path_var_; |
108 | 121 |
109 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); | 122 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Impl); |
110 }; | 123 }; |
111 | 124 |
112 } // namespace ppapi | 125 } // namespace ppapi |
113 } // namespace webkit | 126 } // namespace webkit |
114 | 127 |
115 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ | 128 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_REF_IMPL_H_ |
OLD | NEW |