#ifndef WebInspector_h
#define WebInspector_h
#if ENABLE(INSPECTOR)
#include "APIObject.h"
#include "Connection.h"
#include <WebCore/InspectorForwarding.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/WTFString.h>
namespace WebKit {
class WebInspectorFrontendClient;
class WebPage;
class WebInspector : public API::ObjectImpl<API::Object::Type::BundleInspector> {
public:
static PassRefPtr<WebInspector> create(WebPage*, WebCore::InspectorFrontendChannel*);
WebPage* page() const { return m_page; }
WebPage* inspectorPage() const { return m_inspectorPage; }
void didReceiveWebInspectorMessage(IPC::Connection*, IPC::MessageDecoder&);
void show();
void close();
void didSave(const String& url);
void didAppend(const String& url);
void attachedBottom();
void attachedRight();
void detached();
void evaluateScriptForTest(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
private:
friend class WebInspectorClient;
friend class WebInspectorFrontendClient;
explicit WebInspector(WebPage*, WebCore::InspectorFrontendChannel*);
WebPage* createInspectorPage();
WebPage* createInspectorPageForTest();
void destroyInspectorPage();
void didClose();
void bringToFront();
void inspectedURLChanged(const String&);
bool canSave() const;
void save(const String& filename, const String& content, bool base64Encoded, bool forceSaveAs);
void append(const String& filename, const String& content);
void attachBottom();
void attachRight();
void detach();
void setAttachedWindowHeight(unsigned);
void setAttachedWindowWidth(unsigned);
void setToolbarHeight(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;
WebCore::InspectorFrontendChannel* m_frontendChannel;
#if PLATFORM(COCOA)
mutable String m_localizedStringsURL;
mutable bool m_hasLocalizedStringsURL;
#endif
#if ENABLE(INSPECTOR_SERVER)
bool m_remoteFrontendConnected;
#endif
};
}
#endif // ENABLE(INSPECTOR)
#endif // WebInspector_h