WebInspectorFrontendClient.cpp [plain text]
#include "config.h"
#include "WebInspectorFrontendClient.h"
#if ENABLE(INSPECTOR)
#include "WebInspector.h"
#include "WebPage.h"
#include <WebCore/InspectorController.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include <wtf/text/WTFString.h>
using namespace WebCore;
namespace WebKit {
WebInspectorFrontendClient::WebInspectorFrontendClient(WebPage* page, WebPage* inspectorPage)
: InspectorFrontendClientLocal(page->corePage()->inspectorController(), inspectorPage->corePage(), adoptPtr(new Settings()))
, m_page(page)
{
}
void WebInspectorFrontendClient::frontendLoaded()
{
InspectorFrontendClientLocal::frontendLoaded();
m_page->inspector()->didLoadInspectorPage();
}
String WebInspectorFrontendClient::localizedStringsURL()
{
return m_page->inspector()->localizedStringsURL();
}
String WebInspectorFrontendClient::hiddenPanels()
{
notImplemented();
return String();
}
void WebInspectorFrontendClient::bringToFront()
{
m_page->inspector()->bringToFront();
}
void WebInspectorFrontendClient::closeWindow()
{
m_page->corePage()->inspectorController()->disconnectFrontend();
m_page->inspector()->didClose();
}
void WebInspectorFrontendClient::attachWindow()
{
m_page->inspector()->attach();
}
void WebInspectorFrontendClient::detachWindow()
{
m_page->inspector()->detach();
}
void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height)
{
m_page->inspector()->setAttachedWindowHeight(height);
}
void WebInspectorFrontendClient::inspectedURLChanged(const String& urlString)
{
m_page->inspector()->inspectedURLChanged(urlString);
}
}
#endif // ENABLE(INSPECTOR)