#ifndef CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
#define CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/platform_file.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/host/instance_message_filter.h"
namespace content {
class RendererPpapiHost;
}
namespace ppapi {
namespace proxy {
class SerializedHandle;
}
}
class PepperSharedMemoryMessageFilter
: public ppapi::host::InstanceMessageFilter {
public:
explicit PepperSharedMemoryMessageFilter(content::RendererPpapiHost* host);
virtual ~PepperSharedMemoryMessageFilter();
virtual bool OnInstanceMessageReceived(const IPC::Message& msg) OVERRIDE;
bool Send(IPC::Message* msg);
private:
void OnHostMsgCreateSharedMemory(
PP_Instance instance,
uint32_t size,
int* host_shm_handle_id,
ppapi::proxy::SerializedHandle* plugin_shm_handle);
content::RendererPpapiHost* host_;
DISALLOW_COPY_AND_ASSIGN(PepperSharedMemoryMessageFilter);
};
#endif