OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_PROXY_H_ |
| 6 #define PPAPI_PPB_FLASH_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_Private2; |
| 17 |
| 18 namespace pp { |
| 19 namespace proxy { |
| 20 |
| 21 struct PPBFlash_DrawGlyphs_Params; |
| 22 class SerializedDirEntry; |
| 23 class SerializedVar; |
| 24 class SerializedVarReturnValue; |
| 25 |
| 26 class PPB_Flash_Proxy : public InterfaceProxy { |
| 27 public: |
| 28 PPB_Flash_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 29 virtual ~PPB_Flash_Proxy(); |
| 30 |
| 31 const PPB_Private2* ppb_flash_target() const { |
| 32 return static_cast<const PPB_Private2*>(target_interface()); |
| 33 } |
| 34 |
| 35 // InterfaceProxy implementation. |
| 36 virtual const void* GetSourceInterface() const; |
| 37 virtual InterfaceID GetInterfaceId() const; |
| 38 virtual void OnMessageReceived(const IPC::Message& msg); |
| 39 |
| 40 private: |
| 41 // Message handlers. |
| 42 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, |
| 43 bool on_top); |
| 44 void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params); |
| 45 void OnMsgGetProxyForURL(PP_Module module, |
| 46 const std::string& url, |
| 47 SerializedVarReturnValue result); |
| 48 void OnMsgOpenModuleLocalFile(PP_Module module, |
| 49 const std::string& path, |
| 50 int32_t mode, |
| 51 IPC::PlatformFileForTransit* file_handle, |
| 52 int32_t* result); |
| 53 void OnMsgRenameModuleLocalFile(PP_Module module, |
| 54 const std::string& path_from, |
| 55 const std::string& path_to, |
| 56 int32_t* result); |
| 57 void OnMsgDeleteModuleLocalFileOrDir(PP_Module module, |
| 58 const std::string& path, |
| 59 bool recursive, |
| 60 int32_t* result); |
| 61 void OnMsgCreateModuleLocalDir(PP_Module module, |
| 62 const std::string& path, |
| 63 int32_t* result); |
| 64 void OnMsgQueryModuleLocalFile(PP_Module module, |
| 65 const std::string& path, |
| 66 PP_FileInfo_Dev* info, |
| 67 int32_t* result); |
| 68 void OnMsgGetModuleLocalDirContents( |
| 69 PP_Module module, |
| 70 const std::string& path, |
| 71 std::vector<pp::proxy::SerializedDirEntry>* entries, |
| 72 int32_t* result); |
| 73 void OnMsgNavigateToURL(PP_Instance instance, |
| 74 const std::string& url, |
| 75 const std::string& target, |
| 76 bool* result); |
| 77 }; |
| 78 |
| 79 } // namespace proxy |
| 80 } // namespace pp |
| 81 |
| 82 #endif // PPAPI_PPB_FLASH_PROXY_H_ |
OLD | NEW |