blob: ccd6721b172568a971e3b910d739b8b688f72c46 [file] [log] [blame]
[email protected]43a40202010-11-12 16:25:011// 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_BUFFER_PROXY_H_
6#define PPAPI_PPB_BUFFER_PROXY_H_
7
8#include "ppapi/c/pp_module.h"
9#include "ppapi/proxy/interface_proxy.h"
10
11struct PPB_Buffer_Dev;
12
13namespace pp {
14namespace proxy {
15
16class PPB_Buffer_Proxy : public InterfaceProxy {
17 public:
18 PPB_Buffer_Proxy(Dispatcher* dispatcher, const void* target_interface);
19 virtual ~PPB_Buffer_Proxy();
20
21 const PPB_Buffer_Dev* ppb_buffer_target() const {
22 return static_cast<const PPB_Buffer_Dev*>(target_interface());
23 }
24
25 // InterfaceProxy implementation.
26 virtual const void* GetSourceInterface() const;
27 virtual InterfaceID GetInterfaceId() const;
[email protected]a95986a82010-12-24 06:19:2828 virtual bool OnMessageReceived(const IPC::Message& msg);
[email protected]43a40202010-11-12 16:25:0129
30 private:
31 // Message handlers.
32 void OnMsgCreate(PP_Module module,
[email protected]867b76d632010-12-02 00:09:0733 uint32_t size,
[email protected]43a40202010-11-12 16:25:0134 PP_Resource* result_resource,
[email protected]867b76d632010-12-02 00:09:0735 int* result_shm_handle);
[email protected]43a40202010-11-12 16:25:0136};
37
38} // namespace proxy
39} // namespace pp
40
41#endif // PPAPI_PPB_BUFFER_PROXY_H_