blob: 752ab8a62e1ca35c2cf97266e9360ac9e1d89ded [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
[email protected]859a7f32011-01-15 03:44:138#include "ppapi/c/pp_instance.h"
[email protected]43a40202010-11-12 16:25:019#include "ppapi/proxy/interface_proxy.h"
10
11struct PPB_Buffer_Dev;
12
13namespace pp {
14namespace proxy {
15
[email protected]f24448db2011-01-27 20:40:3916class HostResource;
17
[email protected]43a40202010-11-12 16:25:0118class PPB_Buffer_Proxy : public InterfaceProxy {
19 public:
20 PPB_Buffer_Proxy(Dispatcher* dispatcher, const void* target_interface);
21 virtual ~PPB_Buffer_Proxy();
22
[email protected]465faa22011-02-08 16:31:4623 static const Info* GetInfo();
24
[email protected]9815108e2011-05-27 21:50:2825 static PP_Resource CreateProxyResource(PP_Instance instance,
26 uint32_t size);
27
[email protected]43a40202010-11-12 16:25:0128 const PPB_Buffer_Dev* ppb_buffer_target() const {
29 return static_cast<const PPB_Buffer_Dev*>(target_interface());
30 }
31
32 // InterfaceProxy implementation.
[email protected]a95986a82010-12-24 06:19:2833 virtual bool OnMessageReceived(const IPC::Message& msg);
[email protected]43a40202010-11-12 16:25:0134
35 private:
36 // Message handlers.
[email protected]859a7f32011-01-15 03:44:1337 void OnMsgCreate(PP_Instance instance,
[email protected]867b76d632010-12-02 00:09:0738 uint32_t size,
[email protected]f24448db2011-01-27 20:40:3939 HostResource* result_resource,
[email protected]867b76d632010-12-02 00:09:0740 int* result_shm_handle);
[email protected]43a40202010-11-12 16:25:0141};
42
43} // namespace proxy
44} // namespace pp
45
46#endif // PPAPI_PPB_BUFFER_PROXY_H_