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

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

Issue 14796018: Cleanup: Deprecate FileSystemCallbackDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_file_ref_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_delegate.h
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index f48e94ed57b1462be480a2018ff1eedcc0d25c0a..ccd9e3fdbba96c8dc0b3c2492a4861585092398d 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/files/file_util_proxy.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop_proxy.h"
#include "base/platform_file.h"
@@ -53,10 +54,6 @@ class MessageLoopProxy;
class Time;
}
-namespace fileapi {
-class FileSystemCallbackDispatcher;
-}
-
namespace gfx {
class Point;
}
@@ -501,30 +498,42 @@ class PluginDelegate {
int flags,
const AsyncOpenFileSystemURLCallback& callback) = 0;
+ // Callback typedefs for FileSystem related methods.
+ typedef base::Callback<void (base::PlatformFileError)> StatusCallback;
+ typedef base::Callback<void(
+ const std::vector<base::FileUtilProxy::Entry>& entries,
+ bool has_more)> ReadDirectoryCallback;
+ typedef base::Callback<void(
+ const base::PlatformFileInfo& file_info,
+ const base::FilePath& platform_path)> MetadataCallback;
+
virtual bool MakeDirectory(
const GURL& path,
bool recursive,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const StatusCallback& callback) = 0;
virtual bool Query(const GURL& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const MetadataCallback& success_callback,
+ const StatusCallback& error_callback) = 0;
virtual bool ReadDirectoryEntries(
const GURL& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const ReadDirectoryCallback& success_callback,
+ const StatusCallback& error_callback) = 0;
virtual bool Touch(const GURL& path,
const base::Time& last_access_time,
const base::Time& last_modified_time,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const StatusCallback& callback) = 0;
virtual bool SetLength(const GURL& path,
int64_t length,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const StatusCallback& callback) = 0;
virtual bool Delete(const GURL& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const StatusCallback& callback) = 0;
virtual bool Rename(const GURL& file_path,
const GURL& new_file_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const StatusCallback& callback) = 0;
virtual bool ReadDirectory(
const GURL& directory_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
+ const ReadDirectoryCallback& success_callback,
+ const StatusCallback& error_callback) = 0;
// For quota handlings for FileIO API.
typedef base::Callback<void (int64)> AvailableSpaceCallback;
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_file_ref_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698