| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PPB_BUFFER_PROXY_H_ | 5 #ifndef PPAPI_PPB_BUFFER_PROXY_H_ |
| 6 #define PPAPI_PPB_BUFFER_PROXY_H_ | 6 #define PPAPI_PPB_BUFFER_PROXY_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/proxy/interface_proxy.h" | 9 #include "ppapi/proxy/interface_proxy.h" |
| 10 | 10 |
| 11 struct PPB_Buffer_Dev; | 11 struct PPB_Buffer_Dev; |
| 12 | 12 |
| 13 namespace pp { | 13 namespace pp { |
| 14 namespace proxy { | 14 namespace proxy { |
| 15 | 15 |
| 16 class HostResource; | 16 class HostResource; |
| 17 | 17 |
| 18 class PPB_Buffer_Proxy : public InterfaceProxy { | 18 class PPB_Buffer_Proxy : public InterfaceProxy { |
| 19 public: | 19 public: |
| 20 PPB_Buffer_Proxy(Dispatcher* dispatcher, const void* target_interface); | 20 PPB_Buffer_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 21 virtual ~PPB_Buffer_Proxy(); | 21 virtual ~PPB_Buffer_Proxy(); |
| 22 | 22 |
| 23 static const Info* GetInfo(); |
| 24 |
| 23 const PPB_Buffer_Dev* ppb_buffer_target() const { | 25 const PPB_Buffer_Dev* ppb_buffer_target() const { |
| 24 return static_cast<const PPB_Buffer_Dev*>(target_interface()); | 26 return static_cast<const PPB_Buffer_Dev*>(target_interface()); |
| 25 } | 27 } |
| 26 | 28 |
| 27 // InterfaceProxy implementation. | 29 // InterfaceProxy implementation. |
| 28 virtual const void* GetSourceInterface() const; | |
| 29 virtual InterfaceID GetInterfaceId() const; | |
| 30 virtual bool OnMessageReceived(const IPC::Message& msg); | 30 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 // Message handlers. | 33 // Message handlers. |
| 34 void OnMsgCreate(PP_Instance instance, | 34 void OnMsgCreate(PP_Instance instance, |
| 35 uint32_t size, | 35 uint32_t size, |
| 36 HostResource* result_resource, | 36 HostResource* result_resource, |
| 37 int* result_shm_handle); | 37 int* result_shm_handle); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace proxy | 40 } // namespace proxy |
| 41 } // namespace pp | 41 } // namespace pp |
| 42 | 42 |
| 43 #endif // PPAPI_PPB_BUFFER_PROXY_H_ | 43 #endif // PPAPI_PPB_BUFFER_PROXY_H_ |
| OLD | NEW |