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_CORE_PROXY_H_ |
| 6 #define PPAPI_PPB_CORE_PROXY_H_ |
| 7 |
| 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/pp_resource.h" |
| 10 #include "ppapi/c/pp_var.h" |
| 11 #include "ppapi/proxy/interface_proxy.h" |
| 12 |
| 13 struct PPB_Core; |
| 14 |
| 15 namespace pp { |
| 16 namespace proxy { |
| 17 |
| 18 class PPB_Core_Proxy : public InterfaceProxy { |
| 19 public: |
| 20 PPB_Core_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 21 virtual ~PPB_Core_Proxy(); |
| 22 |
| 23 const PPB_Core* ppb_core_target() const { |
| 24 return reinterpret_cast<const PPB_Core*>(target_interface()); |
| 25 } |
| 26 |
| 27 // InterfaceProxy implementation. |
| 28 virtual const void* GetSourceInterface() const; |
| 29 virtual InterfaceID GetInterfaceId() const; |
| 30 virtual void OnMessageReceived(const IPC::Message& msg); |
| 31 |
| 32 private: |
| 33 // Message handlers. |
| 34 void OnMsgAddRefResource(PP_Resource resource); |
| 35 void OnMsgReleaseResource(PP_Resource resource); |
| 36 }; |
| 37 |
| 38 } // namespace proxy |
| 39 } // namespace pp |
| 40 |
| 41 #endif // PPAPI_PPB_CORE_PROXY_H_ |
OLD | NEW |