blob: 70632cbb95b9cf1c7a1218a155966cb25c89efef [file] [log] [blame]
[email protected]f24448db2011-01-27 20:40:391// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]1de08b32010-11-04 19:38:482// 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]19d2b012010-11-08 16:32:188#include "ppapi/c/pp_bool.h"
[email protected]1de08b32010-11-04 19:38:489#include "ppapi/c/pp_completion_callback.h"
[email protected]f24448db2011-01-27 20:40:3910#include "ppapi/c/pp_instance.h"
[email protected]1de08b32010-11-04 19:38:4811#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]f24448db2011-01-27 20:40:3916#include "ppapi/proxy/serialized_structs.h"
[email protected]1de08b32010-11-04 19:38:4817
18struct PPB_ImageData;
19
20namespace pp {
21namespace proxy {
22
[email protected]f24448db2011-01-27 20:40:3923class HostResource;
24
[email protected]1de08b32010-11-04 19:38:4825class 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]465faa22011-02-08 16:31:4630 static const Info* GetInfo();
31
[email protected]1de08b32010-11-04 19:38:4832 const PPB_ImageData* ppb_image_data_target() const {
33 return static_cast<const PPB_ImageData*>(target_interface());
34 }
35
36 // InterfaceProxy implementation.
[email protected]a95986a82010-12-24 06:19:2837 virtual bool OnMessageReceived(const IPC::Message& msg);
[email protected]1de08b32010-11-04 19:38:4838
39 private:
40 // Message handlers.
41 void OnMsgGetNativeImageDataFormat(int32* result);
[email protected]19d2b012010-11-08 16:32:1842 void OnMsgIsImageDataFormatSupported(int32 format, PP_Bool* result);
[email protected]859a7f32011-01-15 03:44:1343 void OnMsgCreate(PP_Instance instance,
[email protected]1de08b32010-11-04 19:38:4844 int32_t format,
45 const PP_Size& size,
[email protected]19d2b012010-11-08 16:32:1846 PP_Bool init_to_zero,
[email protected]f24448db2011-01-27 20:40:3947 HostResource* result,
[email protected]1de08b32010-11-04 19:38:4848 std::string* image_data_desc,
[email protected]3acbbae42010-12-08 07:50:4049 ImageHandle* result_image_handle);
[email protected]1de08b32010-11-04 19:38:4850};
51
52} // namespace proxy
53} // namespace pp
54
55#endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_