WebDevToolsFrontendImpl.h [plain text]
#ifndef WebDevToolsFrontendImpl_h
#define WebDevToolsFrontendImpl_h
#include "DevToolsRPC.h"
#include "WebDevToolsFrontend.h"
#include <v8.h>
#include <wtf/HashMap.h>
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
class ContextMenuItem;
class Node;
class Page;
class String;
}
namespace WebKit {
class JSDebuggerAgentBoundObj;
class JSProfilerAgentBoundObj;
class JSToolsAgentBoundObj;
class WebDevToolsClientDelegate;
class WebViewImpl;
struct WebDevToolsMessageData;
class WebDevToolsFrontendImpl : public WebKit::WebDevToolsFrontend
, public DevToolsRPC::Delegate
, public Noncopyable {
public:
WebDevToolsFrontendImpl(
WebKit::WebViewImpl* webViewImpl,
WebKit::WebDevToolsFrontendClient* client,
const String& applicationLocale);
virtual ~WebDevToolsFrontendImpl();
virtual void sendRpcMessage(const WebKit::WebDevToolsMessageData& data);
virtual void dispatchMessageFromAgent(const WebKit::WebDevToolsMessageData& data);
void frontendLoaded();
private:
void executeScript(const Vector<String>& v);
static v8::Handle<v8::Value> jsDebuggerCommand(const v8::Arguments& args);
static v8::Handle<v8::Value> jsDebuggerPauseScript(const v8::Arguments& args);
WebKit::WebViewImpl* m_webViewImpl;
WebKit::WebDevToolsFrontendClient* m_client;
String m_applicationLocale;
OwnPtr<JSDebuggerAgentBoundObj> m_debuggerAgentObj;
OwnPtr<JSProfilerAgentBoundObj> m_profilerAgentObj;
OwnPtr<JSToolsAgentBoundObj> m_toolsAgentObj;
bool m_loaded;
Vector<Vector<String> > m_pendingIncomingMessages;
};
}
#endif