| OLD | NEW |
| 1 // Copyright (c) 2011 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 struct PPB_URLRequestInfo_Data; | 23 struct PPB_URLRequestInfo_Data; |
| 24 | 24 |
| 25 namespace proxy { | 25 namespace proxy { |
| 26 | 26 |
| 27 struct PPBFlash_DrawGlyphs_Params; | 27 struct PPBFlash_DrawGlyphs_Params; |
| 28 class SerializedVarReturnValue; | 28 class SerializedVarReturnValue; |
| 29 | 29 |
| 30 class PPB_Flash_Proxy : public InterfaceProxy { | 30 class PPB_Flash_Proxy : public InterfaceProxy { |
| 31 public: | 31 public: |
| 32 PPB_Flash_Proxy(Dispatcher* dispatcher); | 32 PPB_Flash_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 33 virtual ~PPB_Flash_Proxy(); | 33 virtual ~PPB_Flash_Proxy(); |
| 34 | 34 |
| 35 static const Info* GetInfo(); | 35 static const Info* GetInfo(); |
| 36 | 36 |
| 37 const PPB_Flash* ppb_flash_target() const { |
| 38 return static_cast<const PPB_Flash*>(target_interface()); |
| 39 } |
| 40 |
| 37 // InterfaceProxy implementation. | 41 // InterfaceProxy implementation. |
| 38 virtual bool OnMessageReceived(const IPC::Message& msg); | 42 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 39 | 43 |
| 40 private: | 44 private: |
| 41 // Message handlers. | 45 // Message handlers. |
| 42 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, | 46 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, |
| 43 PP_Bool on_top); | 47 PP_Bool on_top); |
| 44 void OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, | 48 void OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, |
| 45 PP_Bool* result); | 49 PP_Bool* result); |
| 46 void OnMsgGetProxyForURL(PP_Instance instance, | 50 void OnMsgGetProxyForURL(PP_Instance instance, |
| 47 const std::string& url, | 51 const std::string& url, |
| 48 SerializedVarReturnValue result); | 52 SerializedVarReturnValue result); |
| 49 void OnMsgNavigate(PP_Instance instance, | 53 void OnMsgNavigate(PP_Instance instance, |
| 50 const PPB_URLRequestInfo_Data& data, | 54 const PPB_URLRequestInfo_Data& data, |
| 51 const std::string& target, | 55 const std::string& target, |
| 52 bool from_user_action, | 56 bool from_user_action, |
| 53 int32_t* result); | 57 int32_t* result); |
| 54 void OnMsgRunMessageLoop(PP_Instance instance); | 58 void OnMsgRunMessageLoop(PP_Instance instance); |
| 55 void OnMsgQuitMessageLoop(PP_Instance instance); | 59 void OnMsgQuitMessageLoop(PP_Instance instance); |
| 56 void OnMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, | 60 void OnMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, |
| 57 double* result); | 61 double* result); |
| 58 | |
| 59 // When this proxy is in the host side, this value caches the interface | |
| 60 // pointer so we don't have to retrieve it from the dispatcher each time. | |
| 61 // In the plugin, this value is always NULL. | |
| 62 const PPB_Flash* ppb_flash_impl_; | |
| 63 | |
| 64 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); | |
| 65 }; | 62 }; |
| 66 | 63 |
| 67 } // namespace proxy | 64 } // namespace proxy |
| 68 } // namespace ppapi | 65 } // namespace ppapi |
| 69 | 66 |
| 70 #endif // PPAPI_PPB_FLASH_PROXY_H_ | 67 #endif // PPAPI_PPB_FLASH_PROXY_H_ |
| OLD | NEW |