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

Unified Diff: ppapi/cpp/file_ref.cc

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased 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
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/file_ref.cc
diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
index 377fbbb04caeba6d52706acd681106a96771ee26..0bc9487eb5eb9205ba630b158f0965ebf646042a 100644
--- a/ppapi/cpp/file_ref.cc
+++ b/ppapi/cpp/file_ref.cc
@@ -6,10 +6,10 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/directory_entry.h"
#include "ppapi/cpp/file_system.h"
#include "ppapi/cpp/module_impl.h"
-
namespace pp {
namespace {
@@ -170,5 +170,13 @@ int32_t FileRef::Query(const CompletionCallbackWithOutput<PP_FileInfo>& cc) {
pp_resource(), cc.output(), cc.pp_completion_callback());
}
+int32_t FileRef::ReadDirectoryEntries(
+ const CompletionCallbackWithOutput<std::vector<DirectoryEntry> >&
+ callback) {
+ if (!has_interface<PPB_FileRef_1_1>())
+ return callback.MayForce(PP_ERROR_NOINTERFACE);
+ return get_interface<PPB_FileRef_1_1>()->ReadDirectoryEntries(
+ pp_resource(), callback.output(), callback.pp_completion_callback());
+}
} // namespace pp
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698