WebPageProxyQt.cpp [plain text]
#include "config.h"
#include "WebPageProxy.h"
#include "PageClient.h"
#include "UserAgentQt.h"
#include "WebKitVersion.h"
#include "WebPageMessages.h"
#include "WebProcessProxy.h"
#include <WebCore/Editor.h>
#include <WebCore/NotImplemented.h>
#if HAVE(QTQUICK)
#include "QtNetworkReplyData.h"
#include "QtPageClient.h"
#include "qquicknetworkreply_p.h"
#endif
using namespace WebCore;
namespace WebKit {
String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent)
{
return UserAgentQt::standardUserAgent(applicationNameForUserAgent, WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
}
void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&)
{
notImplemented();
}
void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
{
notImplemented();
}
void WebPageProxy::registerApplicationScheme(const String& scheme)
{
process()->send(Messages::WebPage::RegisterApplicationScheme(scheme), m_pageID);
}
void WebPageProxy::resolveApplicationSchemeRequest(QtNetworkRequestData request)
{
#if HAVE(QTQUICK)
RefPtr<QtRefCountedNetworkRequestData> requestData = adoptRef(new QtRefCountedNetworkRequestData(request));
m_applicationSchemeRequests.add(requestData);
static_cast<QtPageClient*>(m_pageClient)->handleApplicationSchemeRequest(requestData);
#endif
}
void WebPageProxy::sendApplicationSchemeReply(const QQuickNetworkReply* reply)
{
#if HAVE(QTQUICK)
RefPtr<QtRefCountedNetworkRequestData> requestData = reply->networkRequestData();
if (m_applicationSchemeRequests.contains(requestData)) {
RefPtr<QtRefCountedNetworkReplyData> replyData = reply->networkReplyData();
process()->send(Messages::WebPage::ApplicationSchemeReply(replyData->data()), pageID());
m_applicationSchemeRequests.remove(requestData);
}
#endif
}
void WebPageProxy::didFindZoomableArea(const IntPoint& target, const IntRect& area)
{
m_pageClient->didFindZoomableArea(target, area);
}
void WebPageProxy::findZoomableAreaForPoint(const IntPoint& point, const IntSize& area)
{
if (!isValid())
return;
m_process->send(Messages::WebPage::FindZoomableAreaForPoint(point, area), m_pageID);
}
void WebPageProxy::authenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password)
{
m_pageClient->handleAuthenticationRequiredRequest(hostname, realm, prefilledUsername, username, password);
}
void WebPageProxy::proxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password)
{
m_pageClient->handleProxyAuthenticationRequiredRequest(hostname, port, prefilledUsername, username, password);
}
void WebPageProxy::certificateVerificationRequest(const String& hostname, bool& ignoreErrors)
{
m_pageClient->handleCertificateVerificationRequest(hostname, ignoreErrors);
}
#if PLUGIN_ARCHITECTURE(X11)
void WebPageProxy::createPluginContainer(uint64_t& windowID)
{
notImplemented();
}
void WebPageProxy::windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID)
{
notImplemented();
}
#endif
void WebPageProxy::changeSelectedIndex(int32_t selectedIndex)
{
process()->send(Messages::WebPage::SelectedIndex(selectedIndex), m_pageID);
}
void WebPageProxy::closePopupMenu()
{
process()->send(Messages::WebPage::HidePopupMenu(), m_pageID);
}
void WebPageProxy::willSetInputMethodState()
{
m_pageClient->handleWillSetInputMethodState();
}
}