Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: ppapi/thunk/ppb_file_ref_api.h

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address dmichael's comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 PPAPI_THUNK_PPB_FILE_REF_API_H_ 5 #ifndef PPAPI_THUNK_PPB_FILE_REF_API_H_
6 #define PPAPI_THUNK_PPB_FILE_REF_API_H_ 6 #define PPAPI_THUNK_PPB_FILE_REF_API_H_
7 7
8 #include <vector>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "ppapi/c/ppb_file_ref.h" 11 #include "ppapi/c/ppb_file_ref.h"
10 #include "ppapi/thunk/ppapi_thunk_export.h" 12 #include "ppapi/thunk/ppapi_thunk_export.h"
11 13
12 namespace ppapi { 14 namespace ppapi {
13 15
14 struct PPB_FileRef_CreateInfo; 16 struct PPB_FileRef_CreateInfo;
15 class TrackedCallback; 17 class TrackedCallback;
16 18
17 namespace thunk { 19 namespace thunk {
18 20
19 class PPAPI_THUNK_EXPORT PPB_FileRef_API { 21 class PPAPI_THUNK_EXPORT PPB_FileRef_API {
20 public: 22 public:
21 virtual ~PPB_FileRef_API() {} 23 virtual ~PPB_FileRef_API() {}
22 24
23 virtual PP_FileSystemType GetFileSystemType() const = 0; 25 virtual PP_FileSystemType GetFileSystemType() const = 0;
24 virtual PP_Var GetName() const = 0; 26 virtual PP_Var GetName() const = 0;
25 virtual PP_Var GetPath() const = 0; 27 virtual PP_Var GetPath() const = 0;
26 virtual PP_Resource GetParent() = 0; 28 virtual PP_Resource GetParent() = 0;
27 virtual int32_t MakeDirectory(PP_Bool make_ancestors, 29 virtual int32_t MakeDirectory(PP_Bool make_ancestors,
28 scoped_refptr<TrackedCallback> callback) = 0; 30 scoped_refptr<TrackedCallback> callback) = 0;
29 virtual int32_t Touch(PP_Time last_access_time, 31 virtual int32_t Touch(PP_Time last_access_time,
30 PP_Time last_modified_time, 32 PP_Time last_modified_time,
31 scoped_refptr<TrackedCallback> callback) = 0; 33 scoped_refptr<TrackedCallback> callback) = 0;
32 virtual int32_t Delete(scoped_refptr<TrackedCallback> callback) = 0; 34 virtual int32_t Delete(scoped_refptr<TrackedCallback> callback) = 0;
33 virtual int32_t Rename(PP_Resource new_file_ref, 35 virtual int32_t Rename(PP_Resource new_file_ref,
34 scoped_refptr<TrackedCallback> callback) = 0; 36 scoped_refptr<TrackedCallback> callback) = 0;
35 virtual int32_t Query(PP_FileInfo* info, 37 virtual int32_t Query(PP_FileInfo* info,
36 scoped_refptr<TrackedCallback> callback) = 0; 38 scoped_refptr<TrackedCallback> callback) = 0;
39 virtual int32_t ReadEntries(const PP_ArrayOutput& output,
40 scoped_refptr<TrackedCallback> callback) = 0;
41 // We don't use PP_ArrayOutput for the communication between
42 // renderers and the browser. This function must not be called in
43 // plugins and ReadEntries must not be called in renderers.
44 // TODO(hamaji): This function must be removed when we move
45 // FileRef to the new resource design. http://crbug.com/225441
46 virtual int32_t ReadEntriesInHost(
47 std::vector<ppapi::PPB_FileRef_CreateInfo>* files,
48 std::vector<PP_FileType>* file_types,
49 scoped_refptr<TrackedCallback> callback) = 0;
37 50
38 // Internal function for use in proxying. Returns the internal CreateInfo 51 // Internal function for use in proxying. Returns the internal CreateInfo
39 // (the contained resource does not carry a ref on behalf of the caller). 52 // (the contained resource does not carry a ref on behalf of the caller).
40 virtual const PPB_FileRef_CreateInfo& GetCreateInfo() const = 0; 53 virtual const PPB_FileRef_CreateInfo& GetCreateInfo() const = 0;
41 54
42 // Private API 55 // Private API
43 virtual PP_Var GetAbsolutePath() = 0; 56 virtual PP_Var GetAbsolutePath() = 0;
44 }; 57 };
45 58
46 } // namespace thunk 59 } // namespace thunk
47 } // namespace ppapi 60 } // namespace ppapi
48 61
49 #endif // PPAPI_THUNK_PPB_FILE_REF_API_H_ 62 #endif // PPAPI_THUNK_PPB_FILE_REF_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698