OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 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 |
| 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/pp_module.h" |
| 10 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_size.h" |
| 12 #include "ppapi/c/pp_var.h" |
| 13 #include "ppapi/proxy/interface_proxy.h" |
| 14 |
| 15 struct PPB_ImageData; |
| 16 |
| 17 namespace pp { |
| 18 namespace proxy { |
| 19 |
| 20 class PPB_ImageData_Proxy : public InterfaceProxy { |
| 21 public: |
| 22 PPB_ImageData_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 23 virtual ~PPB_ImageData_Proxy(); |
| 24 |
| 25 const PPB_ImageData* ppb_image_data_target() const { |
| 26 return reinterpret_cast<const PPB_ImageData*>(target_interface()); |
| 27 } |
| 28 |
| 29 // InterfaceProxy implementation. |
| 30 virtual const void* GetSourceInterface() const; |
| 31 virtual InterfaceID GetInterfaceId() const; |
| 32 virtual void OnMessageReceived(const IPC::Message& msg); |
| 33 |
| 34 private: |
| 35 // Message handlers. |
| 36 void OnMsgGetNativeImageDataFormat(int32* result); |
| 37 void OnMsgIsImageDataFormatSupported(int32 format, bool* result); |
| 38 void OnMsgCreate(PP_Module module, |
| 39 int32_t format, |
| 40 const PP_Size& size, |
| 41 bool init_to_zero, |
| 42 PP_Resource* result, |
| 43 std::string* image_data_desc, |
| 44 uint64_t* result_shm_handle); |
| 45 }; |
| 46 |
| 47 } // namespace proxy |
| 48 } // namespace pp |
| 49 |
| 50 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
OLD | NEW |