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

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: address comments by dmichael and raymes 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: ppapi/cpp/file_ref.cc
diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
index 377fbbb04caeba6d52706acd681106a96771ee26..304465480d83e05486d27ac6232fc298622cb1cc 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
« ppapi/c/ppb_file_ref.h ('K') | « ppapi/cpp/file_ref.h ('k') | ppapi/cpp/output_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698