Chromium Code Reviews| Index: content/renderer/pepper/null_file_system_callback_dispatcher.h |
| diff --git a/content/renderer/pepper/null_file_system_callback_dispatcher.h b/content/renderer/pepper/null_file_system_callback_dispatcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c5f459dbccc8616a1e639444ca0a96e5d3ae2fe4 |
| --- /dev/null |
| +++ b/content/renderer/pepper/null_file_system_callback_dispatcher.h |
| @@ -0,0 +1,78 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
| +#define CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/files/file_path.h" |
| +#include "base/files/file_util_proxy.h" |
| +#include "base/logging.h" |
| +#include "base/platform_file.h" |
| +#include "content/common/fileapi/file_system_dispatcher.h" |
| +#include "googleurl/src/gurl.h" |
| +#include "ppapi/shared_impl/file_type_conversion.h" |
| +#include "webkit/fileapi/file_system_callback_dispatcher.h" |
| + |
| +namespace content { |
| + |
| +class NullFileSystemCallbackDispatcher |
| + : public fileapi::FileSystemCallbackDispatcher { |
| + public: |
| + NullFileSystemCallbackDispatcher() {} |
| + |
| + virtual ~NullFileSystemCallbackDispatcher() {} |
| + |
| + virtual void DidSucceed() OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidReadMetadata(const base::PlatformFileInfo& file_info, |
| + const base::FilePath& platform_path) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidCreateSnapshotFile( |
| + const base::PlatformFileInfo& file_info, |
| + const base::FilePath& platform_path) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidReadDirectory( |
| + const std::vector<base::FileUtilProxy::Entry>& entries, |
| + bool has_more) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidOpenFileSystem(const std::string& name, |
| + const GURL& root) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidWrite(int64 bytes, bool complete) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + virtual void DidOpenFile(base::PlatformFile file) OVERRIDE { |
| + NOTREACHED(); |
| + } |
| + |
| + // A Pepper friendly error function. |
| + virtual void OnError(int32_t pp_error) { |
|
yzshen1
2013/04/09 17:25:42
Please see my comment in pepper_file_io_host.cc ab
victorhsieh
2013/04/09 18:02:45
Done. Remove the conversion.
|
| + NOTREACHED(); |
| + } |
| + |
| + private: |
| + virtual void DidFail(base::PlatformFileError platform_error) OVERRIDE { |
| + OnError(ppapi::PlatformFileErrorToPepperError(platform_error)); |
| + } |
| + |
| + DISALLOW_COPY_AND_ASSIGN(NullFileSystemCallbackDispatcher); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |