diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:13:39 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:13:39 +0000 |
commit | f6b8a8d47aeba7ee52e1b3f1ee93f84972a0348c (patch) | |
tree | eaa8ffdb4d676906caba00f241f5c320d460ffb4 /ppapi/proxy/ppb_core_proxy.h | |
parent | 4c2e935b2b9adc5894b9de72b4a119a8cd173b63 (diff) | |
download | chromium_src-f6b8a8d47aeba7ee52e1b3f1ee93f84972a0348c.zip chromium_src-f6b8a8d47aeba7ee52e1b3f1ee93f84972a0348c.tar.gz chromium_src-f6b8a8d47aeba7ee52e1b3f1ee93f84972a0348c.tar.bz2 |
Add proxies for core and class (for calling from WebKit to the plugin). These
don't build by themselves, this is part of a larger patch. You can see most of
the serialization mechanics already checked in to the same directory.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/4345003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_core_proxy.h')
-rw-r--r-- | ppapi/proxy/ppb_core_proxy.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_core_proxy.h b/ppapi/proxy/ppb_core_proxy.h new file mode 100644 index 0000000..66f17d8a --- /dev/null +++ b/ppapi/proxy/ppb_core_proxy.h @@ -0,0 +1,41 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_PPB_CORE_PROXY_H_ +#define PPAPI_PPB_CORE_PROXY_H_ + +#include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_var.h" +#include "ppapi/proxy/interface_proxy.h" + +struct PPB_Core; + +namespace pp { +namespace proxy { + +class PPB_Core_Proxy : public InterfaceProxy { + public: + PPB_Core_Proxy(Dispatcher* dispatcher, const void* target_interface); + virtual ~PPB_Core_Proxy(); + + const PPB_Core* ppb_core_target() const { + return reinterpret_cast<const PPB_Core*>(target_interface()); + } + + // InterfaceProxy implementation. + virtual const void* GetSourceInterface() const; + virtual InterfaceID GetInterfaceId() const; + virtual void OnMessageReceived(const IPC::Message& msg); + + private: + // Message handlers. + void OnMsgAddRefResource(PP_Resource resource); + void OnMsgReleaseResource(PP_Resource resource); +}; + +} // namespace proxy +} // namespace pp + +#endif // PPAPI_PPB_CORE_PROXY_H_ |