#ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_FRAME_HELPER_H_
#define CHROME_RENDERER_EXTENSIONS_EXTENSION_FRAME_HELPER_H_
#include "content/public/common/console_message_level.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_frame_observer_tracker.h"
namespace extensions {
class Dispatcher;
class ExtensionFrameHelper
: public content::RenderFrameObserver,
public content::RenderFrameObserverTracker<ExtensionFrameHelper> {
public:
ExtensionFrameHelper(content::RenderFrame* render_frame,
Dispatcher* extension_dispatcher);
virtual ~ExtensionFrameHelper();
private:
virtual void WillReleaseScriptContext(v8::Handle<v8::Context>,
int world_id) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
void OnAddMessageToConsole(content::ConsoleMessageLevel level,
const std::string& message);
Dispatcher* extension_dispatcher_;
DISALLOW_COPY_AND_ASSIGN(ExtensionFrameHelper);
};
}
#endif