#ifndef WebInspector_h
#define WebInspector_h
#if ENABLE(INSPECTOR)
#include "APIObject.h"
#include "Connection.h"
#include <wtf/Noncopyable.h>
#include <wtf/text/WTFString.h>
namespace WebKit {
class WebInspectorFrontendClient;
class WebPage;
struct WebPageCreationParameters;
class WebInspector : public APIObject {
public:
static const Type APIType = TypeBundleInspector;
static PassRefPtr<WebInspector> create(WebPage*);
WebPage* page() const { return m_page; }
WebPage* inspectorPage() const { return m_inspectorPage; }
void didReceiveWebInspectorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void show();
void close();
void evaluateScriptForTest(long callID, const String& script);
void setJavaScriptProfilingEnabled(bool);
void startPageProfiling();
void stopPageProfiling();
#if ENABLE(INSPECTOR_SERVER)
bool hasRemoteFrontendConnected() const { return m_remoteFrontendConnected; }
void sendMessageToRemoteFrontend(const String& message);
void dispatchMessageFromRemoteFrontend(const String& message);
void remoteFrontendConnected();
void remoteFrontendDisconnected();
#endif
#if PLATFORM(MAC)
void setInspectorUsesWebKitUserInterface(bool);
#endif
private:
friend class WebInspectorClient;
friend class WebInspectorFrontendClient;
explicit WebInspector(WebPage*);
virtual Type type() const { return APIType; }
WebPage* createInspectorPage();
void destroyInspectorPage();
void didLoadInspectorPage();
void didClose();
void bringToFront();
void inspectedURLChanged(const String&);
void attach();
void detach();
void setAttachedWindowHeight(unsigned);
String localizedStringsURL() const;
void showConsole();
void showResources();
void showMainResourceForFrame(uint64_t frameID);
void startJavaScriptDebugging();
void stopJavaScriptDebugging();
void startJavaScriptProfiling();
void stopJavaScriptProfiling();
void updateDockingAvailability();
WebPage* m_page;
WebPage* m_inspectorPage;
WebInspectorFrontendClient* m_frontendClient;
#if PLATFORM(MAC)
String m_localizedStringsURL;
#endif
#if ENABLE(INSPECTOR_SERVER)
bool m_remoteFrontendConnected;
#endif
};
}
#endif // ENABLE(INSPECTOR)
#endif // WebInspector_h