#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_H_
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ppapi/host/resource_message_filter.h"
#include "ppapi/shared_impl/flash_clipboard_format_registry.h"
namespace ppapi {
namespace host {
struct HostMessageContext;
}
}
namespace ui {
class ScopedClipboardWriter;
}
namespace chrome {
class PepperFlashClipboardMessageFilter
: public ppapi::host::ResourceMessageFilter {
public:
PepperFlashClipboardMessageFilter();
protected:
virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(
const IPC::Message& msg) OVERRIDE;
virtual int32_t OnResourceMessageReceived(
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) OVERRIDE;
private:
virtual ~PepperFlashClipboardMessageFilter();
int32_t OnMsgRegisterCustomFormat(
ppapi::host::HostMessageContext* host_context,
const std::string& format_name);
int32_t OnMsgIsFormatAvailable(ppapi::host::HostMessageContext* host_context,
uint32_t clipboard_type,
uint32_t format);
int32_t OnMsgReadData(ppapi::host::HostMessageContext* host_context,
uint32_t clipoard_type,
uint32_t format);
int32_t OnMsgWriteData(ppapi::host::HostMessageContext* host_context,
uint32_t clipboard_type,
const std::vector<uint32_t>& formats,
const std::vector<std::string>& data);
int32_t OnMsgGetSequenceNumber(ppapi::host::HostMessageContext* host_context,
uint32_t clipboard_type);
int32_t WriteClipboardDataItem(uint32_t format,
const std::string& data,
ui::ScopedClipboardWriter* scw);
ppapi::FlashClipboardFormatRegistry custom_formats_;
DISALLOW_COPY_AND_ASSIGN(PepperFlashClipboardMessageFilter);
};
}
#endif