| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PPB_FLASH_PROXY_H_ | 5 #ifndef PPAPI_PPB_FLASH_PROXY_H_ |
| 6 #define PPAPI_PPB_FLASH_PROXY_H_ | 6 #define PPAPI_PPB_FLASH_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ipc/ipc_platform_file.h" | 10 #include "ipc/ipc_platform_file.h" |
| 11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_module.h" | 12 #include "ppapi/c/pp_module.h" |
| 13 #include "ppapi/proxy/interface_proxy.h" | 13 #include "ppapi/proxy/interface_proxy.h" |
| 14 | 14 |
| 15 struct PP_FileInfo_Dev; | 15 struct PP_FileInfo_Dev; |
| 16 struct PPB_Flash; | 16 struct PPB_Flash; |
| 17 | 17 |
| 18 namespace pp { | 18 namespace pp { |
| 19 namespace proxy { | 19 namespace proxy { |
| 20 | 20 |
| 21 struct PPBFlash_DrawGlyphs_Params; | 21 struct PPBFlash_DrawGlyphs_Params; |
| 22 struct SerializedDirEntry; | |
| 23 class SerializedVar; | |
| 24 class SerializedVarReturnValue; | 22 class SerializedVarReturnValue; |
| 25 | 23 |
| 26 class PPB_Flash_Proxy : public InterfaceProxy { | 24 class PPB_Flash_Proxy : public InterfaceProxy { |
| 27 public: | 25 public: |
| 28 PPB_Flash_Proxy(Dispatcher* dispatcher, const void* target_interface); | 26 PPB_Flash_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 29 virtual ~PPB_Flash_Proxy(); | 27 virtual ~PPB_Flash_Proxy(); |
| 30 | 28 |
| 31 static const Info* GetInfo(); | 29 static const Info* GetInfo(); |
| 32 | 30 |
| 33 const PPB_Flash* ppb_flash_target() const { | 31 const PPB_Flash* ppb_flash_target() const { |
| 34 return static_cast<const PPB_Flash*>(target_interface()); | 32 return static_cast<const PPB_Flash*>(target_interface()); |
| 35 } | 33 } |
| 36 | 34 |
| 37 // InterfaceProxy implementation. | 35 // InterfaceProxy implementation. |
| 38 virtual bool OnMessageReceived(const IPC::Message& msg); | 36 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 39 | 37 |
| 40 private: | 38 private: |
| 41 // Message handlers. | 39 // Message handlers. |
| 42 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, | 40 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, |
| 43 PP_Bool on_top); | 41 PP_Bool on_top); |
| 44 void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params, | 42 void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params, |
| 45 PP_Bool* result); | 43 PP_Bool* result); |
| 46 void OnMsgGetProxyForURL(PP_Instance instance, | 44 void OnMsgGetProxyForURL(PP_Instance instance, |
| 47 const std::string& url, | 45 const std::string& url, |
| 48 SerializedVarReturnValue result); | 46 SerializedVarReturnValue result); |
| 49 void OnMsgOpenModuleLocalFile(PP_Instance instance, | |
| 50 const std::string& path, | |
| 51 int32_t mode, | |
| 52 IPC::PlatformFileForTransit* file_handle, | |
| 53 int32_t* result); | |
| 54 void OnMsgRenameModuleLocalFile(PP_Instance instance, | |
| 55 const std::string& path_from, | |
| 56 const std::string& path_to, | |
| 57 int32_t* result); | |
| 58 void OnMsgDeleteModuleLocalFileOrDir(PP_Instance instance, | |
| 59 const std::string& path, | |
| 60 PP_Bool recursive, | |
| 61 int32_t* result); | |
| 62 void OnMsgCreateModuleLocalDir(PP_Instance instance, | |
| 63 const std::string& path, | |
| 64 int32_t* result); | |
| 65 void OnMsgQueryModuleLocalFile(PP_Instance instance, | |
| 66 const std::string& path, | |
| 67 PP_FileInfo_Dev* info, | |
| 68 int32_t* result); | |
| 69 void OnMsgGetModuleLocalDirContents( | |
| 70 PP_Instance instance, | |
| 71 const std::string& path, | |
| 72 std::vector<pp::proxy::SerializedDirEntry>* entries, | |
| 73 int32_t* result); | |
| 74 void OnMsgNavigateToURL(PP_Instance instance, | 47 void OnMsgNavigateToURL(PP_Instance instance, |
| 75 const std::string& url, | 48 const std::string& url, |
| 76 const std::string& target, | 49 const std::string& target, |
| 77 PP_Bool* result); | 50 PP_Bool* result); |
| 78 void OnMsgRunMessageLoop(PP_Instance instance); | 51 void OnMsgRunMessageLoop(PP_Instance instance); |
| 79 void OnMsgQuitMessageLoop(PP_Instance instance); | 52 void OnMsgQuitMessageLoop(PP_Instance instance); |
| 80 }; | 53 }; |
| 81 | 54 |
| 82 } // namespace proxy | 55 } // namespace proxy |
| 83 } // namespace pp | 56 } // namespace pp |
| 84 | 57 |
| 85 #endif // PPAPI_PPB_FLASH_PROXY_H_ | 58 #endif // PPAPI_PPB_FLASH_PROXY_H_ |
| OLD | NEW |