#ifndef CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_
#define CONTENT_COMMON_FONT_CACHE_DISPATCHER_WIN_H_
#include <windows.h>
#include "base/basictypes.h"
#include "base/memory/singleton.h"
#include "ipc/ipc_channel_proxy.h"
namespace content {
class FontCacheDispatcher : public IPC::ChannelProxy::MessageFilter,
public IPC::Sender {
public:
FontCacheDispatcher();
virtual ~FontCacheDispatcher();
virtual bool Send(IPC::Message* message) OVERRIDE;
private:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
void OnPreCacheFont(const LOGFONT& font);
void OnReleaseCachedFonts();
IPC::Channel* channel_;
DISALLOW_COPY_AND_ASSIGN(FontCacheDispatcher);
};
}
#endif