#ifndef CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_
#include "content/child/npapi/np_channel_base.h"
namespace content {
class JavaBridgeChannelHost : public NPChannelBase {
public:
static JavaBridgeChannelHost* GetJavaBridgeChannelHost(
int renderer_id,
base::MessageLoopProxy* ipc_message_loop);
static int ThreadsafeGenerateRouteID();
virtual int GenerateRouteID() OVERRIDE;
virtual bool Init(base::MessageLoopProxy* ipc_message_loop,
bool create_pipe_now,
base::WaitableEvent* shutdown_event) OVERRIDE;
protected:
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
private:
JavaBridgeChannelHost() {}
friend class base::RefCountedThreadSafe<JavaBridgeChannelHost>;
virtual ~JavaBridgeChannelHost();
static NPChannelBase* ClassFactory() {
return new JavaBridgeChannelHost();
}
void OnGenerateRouteID(int* route_id);
DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannelHost);
};
}
#endif