Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | |
| 6 #define CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/files/file_path.h" | |
| 12 #include "base/files/file_util_proxy.h" | |
| 13 #include "base/logging.h" | |
| 14 #include "base/platform_file.h" | |
| 15 #include "content/common/fileapi/file_system_dispatcher.h" | |
| 16 #include "googleurl/src/gurl.h" | |
| 17 #include "ppapi/shared_impl/file_type_conversion.h" | |
| 18 #include "webkit/fileapi/file_system_callback_dispatcher.h" | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 class NullFileSystemCallbackDispatcher | |
| 23 : public fileapi::FileSystemCallbackDispatcher { | |
| 24 public: | |
| 25 NullFileSystemCallbackDispatcher() {} | |
| 26 | |
| 27 virtual ~NullFileSystemCallbackDispatcher() {} | |
| 28 | |
| 29 virtual void DidSucceed() OVERRIDE { | |
| 30 NOTREACHED(); | |
| 31 } | |
| 32 | |
| 33 virtual void DidReadMetadata(const base::PlatformFileInfo& file_info, | |
| 34 const base::FilePath& platform_path) OVERRIDE { | |
| 35 NOTREACHED(); | |
| 36 } | |
| 37 | |
| 38 virtual void DidCreateSnapshotFile( | |
| 39 const base::PlatformFileInfo& file_info, | |
| 40 const base::FilePath& platform_path) OVERRIDE { | |
| 41 NOTREACHED(); | |
| 42 } | |
| 43 | |
| 44 virtual void DidReadDirectory( | |
| 45 const std::vector<base::FileUtilProxy::Entry>& entries, | |
| 46 bool has_more) OVERRIDE { | |
| 47 NOTREACHED(); | |
| 48 } | |
| 49 | |
| 50 virtual void DidOpenFileSystem(const std::string& name, | |
| 51 const GURL& root) OVERRIDE { | |
| 52 NOTREACHED(); | |
| 53 } | |
| 54 | |
| 55 virtual void DidWrite(int64 bytes, bool complete) OVERRIDE { | |
| 56 NOTREACHED(); | |
| 57 } | |
| 58 | |
| 59 virtual void DidOpenFile(base::PlatformFile file) OVERRIDE { | |
| 60 NOTREACHED(); | |
| 61 } | |
| 62 | |
| 63 // A Pepper friendly error function. | |
| 64 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.
| |
| 65 NOTREACHED(); | |
| 66 } | |
| 67 | |
| 68 private: | |
| 69 virtual void DidFail(base::PlatformFileError platform_error) OVERRIDE { | |
| 70 OnError(ppapi::PlatformFileErrorToPepperError(platform_error)); | |
| 71 } | |
| 72 | |
| 73 DISALLOW_COPY_AND_ASSIGN(NullFileSystemCallbackDispatcher); | |
| 74 }; | |
| 75 | |
| 76 } // namespace content | |
| 77 | |
| 78 #endif // CONTENT_RENDERER_PEPPER_NULL_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | |
| OLD | NEW |