[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [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_IMAGE_DATA_PROXY_H_ | ||||
6 | #define PPAPI_PPB_IMAGE_DATA_PROXY_H_ | ||||
7 | |||||
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 8 | #include "ppapi/c/pp_bool.h" |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 9 | #include "ppapi/c/pp_completion_callback.h" |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 10 | #include "ppapi/c/pp_instance.h" |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 11 | #include "ppapi/c/pp_module.h" |
12 | #include "ppapi/c/pp_resource.h" | ||||
13 | #include "ppapi/c/pp_size.h" | ||||
14 | #include "ppapi/c/pp_var.h" | ||||
15 | #include "ppapi/proxy/interface_proxy.h" | ||||
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 16 | #include "ppapi/proxy/serialized_structs.h" |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 17 | |
18 | struct PPB_ImageData; | ||||
19 | |||||
20 | namespace pp { | ||||
21 | namespace proxy { | ||||
22 | |||||
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 23 | class HostResource; |
24 | |||||
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 25 | class PPB_ImageData_Proxy : public InterfaceProxy { |
26 | public: | ||||
27 | PPB_ImageData_Proxy(Dispatcher* dispatcher, const void* target_interface); | ||||
28 | virtual ~PPB_ImageData_Proxy(); | ||||
29 | |||||
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 30 | static const Info* GetInfo(); |
31 | |||||
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 32 | const PPB_ImageData* ppb_image_data_target() const { |
33 | return static_cast<const PPB_ImageData*>(target_interface()); | ||||
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] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 38 | |
39 | private: | ||||
40 | // Message handlers. | ||||
41 | void OnMsgGetNativeImageDataFormat(int32* result); | ||||
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 42 | void OnMsgIsImageDataFormatSupported(int32 format, PP_Bool* result); |
[email protected] | 859a7f3 | 2011-01-15 03:44:13 | [diff] [blame] | 43 | void OnMsgCreate(PP_Instance instance, |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 44 | int32_t format, |
45 | const PP_Size& size, | ||||
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 46 | PP_Bool init_to_zero, |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 47 | HostResource* result, |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 48 | std::string* image_data_desc, |
[email protected] | 3acbbae4 | 2010-12-08 07:50:40 | [diff] [blame] | 49 | ImageHandle* result_image_handle); |
[email protected] | 1de08b3 | 2010-11-04 19:38:48 | [diff] [blame] | 50 | }; |
51 | |||||
52 | } // namespace proxy | ||||
53 | } // namespace pp | ||||
54 | |||||
55 | #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |