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
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_FILEAPI_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_
6 #define CONTENT_COMMON_FILEAPI_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_
8 #include "base/basictypes.h"
9 #include "base/platform_file.h"
10 #include "webkit/fileapi/file_system_callback_dispatcher.h"
15 class WebFileSystemCallbacks
;
20 class WebFileSystemCallbackDispatcher
21 : public fileapi::FileSystemCallbackDispatcher
{
23 explicit WebFileSystemCallbackDispatcher(
24 WebKit::WebFileSystemCallbacks
* callbacks
);
26 // FileSystemCallbackDispatcher implementation
27 virtual void DidSucceed() OVERRIDE
;
28 virtual void DidReadMetadata(
29 const base::PlatformFileInfo
& file_info
,
30 const base::FilePath
& platform_path
) OVERRIDE
;
31 virtual void DidCreateSnapshotFile(
32 const base::PlatformFileInfo
& file_info
,
33 const base::FilePath
& platform_path
) OVERRIDE
;
34 virtual void DidReadDirectory(
35 const std::vector
<base::FileUtilProxy::Entry
>& entries
,
36 bool has_more
) OVERRIDE
;
37 virtual void DidOpenFileSystem(const std::string
&,
38 const GURL
&) OVERRIDE
;
39 virtual void DidFail(base::PlatformFileError
) OVERRIDE
;
40 virtual void DidWrite(int64 bytes
, bool complete
) OVERRIDE
;
43 WebKit::WebFileSystemCallbacks
* callbacks_
;
46 } // namespace content
48 #endif // CONTENT_COMMON_FILEAPI_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_