[email protected] | d07fa379 | 2011-02-24 18:58:01 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 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" | ||||
[email protected] | 181220ba | 2011-03-28 18:21:05 | [diff] [blame] | 13 | #include "ppapi/proxy/host_resource.h" |
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 14 | #include "ppapi/proxy/interface_proxy.h" |
15 | |||||
16 | struct PP_FileInfo_Dev; | ||||
[email protected] | 0bd75368 | 2010-12-16 18:15:52 | [diff] [blame] | 17 | struct PPB_Flash; |
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 18 | |
19 | namespace pp { | ||||
20 | namespace proxy { | ||||
21 | |||||
22 | struct PPBFlash_DrawGlyphs_Params; | ||||
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 23 | class SerializedVarReturnValue; |
24 | |||||
25 | class PPB_Flash_Proxy : public InterfaceProxy { | ||||
26 | public: | ||||
27 | PPB_Flash_Proxy(Dispatcher* dispatcher, const void* target_interface); | ||||
28 | virtual ~PPB_Flash_Proxy(); | ||||
29 | |||||
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 30 | static const Info* GetInfo(); |
31 | |||||
[email protected] | 0bd75368 | 2010-12-16 18:15:52 | [diff] [blame] | 32 | const PPB_Flash* ppb_flash_target() const { |
33 | return static_cast<const PPB_Flash*>(target_interface()); | ||||
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 34 | } |
35 | |||||
36 | // InterfaceProxy implementation. | ||||
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 37 | virtual bool OnMessageReceived(const IPC::Message& msg); |
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 38 | |
39 | private: | ||||
40 | // Message handlers. | ||||
41 | void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, | ||||
[email protected] | 4614f19 | 2011-01-21 00:26:43 | [diff] [blame] | 42 | PP_Bool on_top); |
[email protected] | 99627bcf | 2010-12-02 23:59:53 | [diff] [blame] | 43 | void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params, |
[email protected] | 4614f19 | 2011-01-21 00:26:43 | [diff] [blame] | 44 | PP_Bool* result); |
[email protected] | 859a7f3 | 2011-01-15 03:44:13 | [diff] [blame] | 45 | void OnMsgGetProxyForURL(PP_Instance instance, |
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 46 | const std::string& url, |
47 | SerializedVarReturnValue result); | ||||
[email protected] | 181220ba | 2011-03-28 18:21:05 | [diff] [blame] | 48 | void OnMsgNavigate(const HostResource& request_info, |
49 | const std::string& target, | ||||
50 | bool from_user_action, | ||||
51 | int32_t* result); | ||||
[email protected] | 7358d57 | 2011-02-15 18:44:40 | [diff] [blame] | 52 | void OnMsgRunMessageLoop(PP_Instance instance); |
53 | void OnMsgQuitMessageLoop(PP_Instance instance); | ||||
[email protected] | 43a4020 | 2010-11-12 16:25:01 | [diff] [blame] | 54 | }; |
55 | |||||
56 | } // namespace proxy | ||||
57 | } // namespace pp | ||||
58 | |||||
59 | #endif // PPAPI_PPB_FLASH_PROXY_H_ |