OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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_PPB_FLASH_FILE_PROXY_H_ |
| 6 #define PPAPI_PPB_FLASH_FILE_PROXY_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ipc/ipc_platform_file.h" |
| 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_module.h" |
| 13 #include "ppapi/proxy/interface_proxy.h" |
| 14 |
| 15 struct PP_FileInfo_Dev; |
| 16 struct PPB_Flash_File_ModuleLocal; |
| 17 |
| 18 namespace pp { |
| 19 namespace proxy { |
| 20 |
| 21 struct SerializedDirEntry; |
| 22 |
| 23 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { |
| 24 public: |
| 25 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher, |
| 26 const void* target_interface); |
| 27 virtual ~PPB_Flash_File_ModuleLocal_Proxy(); |
| 28 |
| 29 static const Info* GetInfo(); |
| 30 |
| 31 const PPB_Flash_File_ModuleLocal* ppb_flash_file_module_local_target() const { |
| 32 return static_cast<const PPB_Flash_File_ModuleLocal*>(target_interface()); |
| 33 } |
| 34 |
| 35 // InterfaceProxy implementation. |
| 36 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 37 |
| 38 private: |
| 39 // Message handlers. |
| 40 void OnMsgOpenFile(PP_Instance instance, |
| 41 const std::string& path, |
| 42 int32_t mode, |
| 43 IPC::PlatformFileForTransit* file_handle, |
| 44 int32_t* result); |
| 45 void OnMsgRenameFile(PP_Instance instance, |
| 46 const std::string& path_from, |
| 47 const std::string& path_to, |
| 48 int32_t* result); |
| 49 void OnMsgDeleteFileOrDir(PP_Instance instance, |
| 50 const std::string& path, |
| 51 PP_Bool recursive, |
| 52 int32_t* result); |
| 53 void OnMsgCreateDir(PP_Instance instance, |
| 54 const std::string& path, |
| 55 int32_t* result); |
| 56 void OnMsgQueryFile(PP_Instance instance, |
| 57 const std::string& path, |
| 58 PP_FileInfo_Dev* info, |
| 59 int32_t* result); |
| 60 void OnMsgGetDirContents(PP_Instance instance, |
| 61 const std::string& path, |
| 62 std::vector<pp::proxy::SerializedDirEntry>* entries, |
| 63 int32_t* result); |
| 64 }; |
| 65 |
| 66 } // namespace proxy |
| 67 } // namespace pp |
| 68 |
| 69 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ |
OLD | NEW |