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

Unified Diff: webkit/plugins/ppapi/file_callbacks.h

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix naclsdk Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/ppapi/file_callbacks.h
diff --git a/webkit/plugins/ppapi/file_callbacks.h b/webkit/plugins/ppapi/file_callbacks.h
index c45932ab885a44532ab692201798f4b27544bbac..27be64a1c51e6a0af469fe8ccf71e968dea1ce3c 100644
--- a/webkit/plugins/ppapi/file_callbacks.h
+++ b/webkit/plugins/ppapi/file_callbacks.h
@@ -8,10 +8,12 @@
#include <string>
#include <vector>
+#include "base/bind_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/platform_file.h"
#include "googleurl/src/gurl.h"
+#include "ppapi/c/pp_array_output.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/pp_resource.h"
@@ -26,14 +28,24 @@ class FilePath;
namespace ppapi {
class Resource;
class TrackedCallback;
+struct PPB_FileRef_CreateInfo;
}
namespace webkit {
namespace ppapi {
+class PPB_FileRef_Impl;
+
// Instances of this class are deleted by FileSystemDispatcher.
class FileCallbacks : public fileapi::FileSystemCallbackDispatcher {
public:
+ // Don't take the ownership of members.
teravest 2013/05/02 17:32:10 s/Don't/Doesn't/ ?
hamaji 2013/05/02 18:49:40 Done.
+ struct ReadEntriesParams {
+ PPB_FileRef_Impl* dir_ref;
+ std::vector< ::ppapi::PPB_FileRef_CreateInfo>* files;
+ std::vector<PP_FileType>* file_types;
+ };
+
FileCallbacks(::ppapi::Resource* resource,
scoped_refptr< ::ppapi::TrackedCallback> callback,
PP_FileInfo* info);
@@ -41,6 +53,9 @@ class FileCallbacks : public fileapi::FileSystemCallbackDispatcher {
scoped_refptr< ::ppapi::TrackedCallback> callback,
PP_FileInfo* info,
PP_FileSystemType file_system_type);
+ FileCallbacks(::ppapi::Resource* resource,
+ scoped_refptr< ::ppapi::TrackedCallback> callback,
+ base::internal::OwnedWrapper<ReadEntriesParams> params);
dmichael (off chromium) 2013/05/02 19:43:54 Can you just use scoped_ptr and scoped_ptr::Pass?
hamaji 2013/05/02 20:14:49 Yeah, I've modified this code to just pass |params
virtual ~FileCallbacks();
// FileSystemCallbackDispatcher implementation.
@@ -66,6 +81,7 @@ class FileCallbacks : public fileapi::FileSystemCallbackDispatcher {
scoped_refptr< ::ppapi::TrackedCallback> callback_;
PP_FileInfo* info_;
PP_FileSystemType file_system_type_;
+ base::internal::OwnedWrapper<ReadEntriesParams> read_entries_params_;
};
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698