Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef PPAPI_PROXY_FLASH_FILE_RESOURCE_H_ | |
| 6 #define PPAPI_PROXY_FLASH_FILE_RESOURCE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ppapi/proxy/connection.h" | |
| 11 #include "ppapi/proxy/plugin_resource.h" | |
| 12 #include "ppapi/shared_impl/file_path.h" | |
| 13 #include "ppapi/thunk/ppb_flash_file_api.h" | |
| 14 | |
| 15 struct PP_ArrayOutput; | |
|
yzshen1
2012/11/21 00:38:59
Why do we need this?
raymes
2012/11/21 22:44:53
Done.
| |
| 16 | |
| 17 namespace ppapi { | |
| 18 namespace proxy { | |
| 19 | |
| 20 class FlashFileResource | |
| 21 : public PluginResource, | |
| 22 public NON_EXPORTED_BASE(thunk::PPB_Flash_File_API) { | |
|
yzshen1
2012/11/21 00:38:59
You don't need NON_EXPORTED_BASE here.
raymes
2012/11/21 22:44:53
Done.
| |
| 23 public: | |
| 24 FlashFileResource(Connection connection, PP_Instance instance); | |
| 25 virtual ~FlashFileResource(); | |
| 26 | |
| 27 // Resource overrides. | |
| 28 virtual thunk::PPB_Flash_File_API* AsPPB_Flash_File_API() OVERRIDE; | |
| 29 | |
| 30 // PPB_Flash_Functions_API. | |
| 31 virtual int32_t OpenFile(PP_Instance instance, | |
| 32 const char* path, | |
| 33 int32_t mode, | |
| 34 PP_FileHandle* file) OVERRIDE; | |
| 35 virtual int32_t RenameFile(PP_Instance instance, | |
| 36 const char* path_from, | |
| 37 const char* path_to) OVERRIDE; | |
| 38 virtual int32_t DeleteFileOrDir(PP_Instance instance, | |
| 39 const char* path, | |
| 40 PP_Bool recursive) OVERRIDE; | |
| 41 virtual int32_t CreateDir(PP_Instance instance, const char* path) OVERRIDE; | |
| 42 virtual int32_t QueryFile(PP_Instance instance, | |
| 43 const char* path, | |
| 44 PP_FileInfo* info) OVERRIDE; | |
| 45 virtual int32_t GetDirContents(PP_Instance instance, | |
| 46 const char* path, | |
| 47 PP_DirContents_Dev** contents) OVERRIDE; | |
| 48 virtual void FreeDirContents(PP_Instance instance, | |
| 49 PP_DirContents_Dev* contents) OVERRIDE; | |
| 50 virtual int32_t CreateTemporaryFile(PP_Instance instance, | |
| 51 PP_FileHandle* file) OVERRIDE; | |
| 52 virtual int32_t OpenFileRef(PP_Instance instance, | |
| 53 PP_Resource file_ref, | |
| 54 int32_t mode, | |
| 55 PP_FileHandle* file) OVERRIDE; | |
| 56 virtual int32_t QueryFileRef(PP_Instance instance, | |
| 57 PP_Resource file_ref, | |
| 58 PP_FileInfo* info) OVERRIDE; | |
| 59 | |
| 60 private: | |
| 61 int32_t OpenFileHelper(PP_Instance instance, | |
| 62 const std::string& path, | |
| 63 PepperFilePath::Domain domain_type, | |
| 64 int32_t mode, | |
| 65 PP_FileHandle* file); | |
| 66 int32_t QueryFileHelper(PP_Instance instance, | |
| 67 const std::string& path, | |
| 68 PepperFilePath::Domain domain_type, | |
| 69 PP_FileInfo* info); | |
| 70 | |
| 71 DISALLOW_COPY_AND_ASSIGN(FlashFileResource); | |
| 72 }; | |
| 73 | |
| 74 } // namespace proxy | |
| 75 } // namespace ppapi | |
| 76 | |
| 77 #endif // PPAPI_PROXY_FLASH_FILE_RESOURCE_H_ | |
| OLD | NEW |