OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_ |
| 7 |
| 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/proxy/host_resource.h" |
| 10 #include "ppapi/proxy/interface_proxy.h" |
| 11 |
| 12 struct PP_Size; |
| 13 struct PPP_VideoDecoder_Dev; |
| 14 |
| 15 namespace pp { |
| 16 namespace proxy { |
| 17 |
| 18 class PPP_VideoDecoder_Proxy : public InterfaceProxy { |
| 19 public: |
| 20 PPP_VideoDecoder_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 21 virtual ~PPP_VideoDecoder_Proxy(); |
| 22 |
| 23 static const Info* GetInfo(); |
| 24 |
| 25 const PPP_VideoDecoder_Dev* ppp_video_decoder_target() const { |
| 26 return reinterpret_cast<const PPP_VideoDecoder_Dev*>(target_interface()); |
| 27 } |
| 28 |
| 29 // InterfaceProxy implementation. |
| 30 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 31 |
| 32 private: |
| 33 // Message handlers. |
| 34 void OnMsgProvidePictureBuffers(PP_Instance instance, |
| 35 HostResource decoder, |
| 36 uint32_t req_num_of_buffers, |
| 37 const PP_Size& dimensions); |
| 38 void OnMsgDismissPictureBuffer(PP_Instance instance, |
| 39 HostResource decoder, |
| 40 int32_t picture_id); |
| 41 void OnMsgPictureReady(PP_Instance instance, HostResource decoder, |
| 42 int32_t picture_id, int32_t bitstream_id); |
| 43 void OnMsgNotifyEndOfStream(PP_Instance instance, HostResource decoder); |
| 44 void OnMsgNotifyError(PP_Instance instance, HostResource decoder, |
| 45 uint32_t error); |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(PPP_VideoDecoder_Proxy); |
| 48 }; |
| 49 |
| 50 } // namespace proxy |
| 51 } // namespace pp |
| 52 |
| 53 #endif // PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_ |
OLD | NEW |