1 // Copyright (c) 2012 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.
5 #ifndef PPAPI_PPB_CORE_PROXY_H_
6 #define PPAPI_PPB_CORE_PROXY_H_
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/c/ppb_core.h"
12 #include "ppapi/proxy/interface_proxy.h"
13 #include "ppapi/shared_impl/host_resource.h"
18 class PPB_Core_Proxy
: public InterfaceProxy
{
20 PPB_Core_Proxy(Dispatcher
* dispatcher
);
21 virtual ~PPB_Core_Proxy();
23 static const PPB_Core
* GetPPB_Core_Interface();
25 // InterfaceProxy implementation.
26 virtual bool OnMessageReceived(const IPC::Message
& msg
);
28 static const ApiID kApiID
= API_ID_PPB_CORE
;
32 void OnMsgAddRefResource(const ppapi::HostResource
& resource
);
33 void OnMsgReleaseResource(const ppapi::HostResource
& resource
);
35 // When this proxy is in the host side, this value caches the interface
36 // pointer so we don't have to retrieve it from the dispatcher each time.
37 // In the plugin, this value is always NULL.
38 const PPB_Core
* ppb_core_impl_
;
44 #endif // PPAPI_PPB_CORE_PROXY_H_