WebPageProxyWPE.cpp [plain text]
#include "config.h"
#include "WebPageProxy.h"
#include "EditorState.h"
#include "InputMethodState.h"
#include "PageClientImpl.h"
#include "WebsiteDataStore.h"
#include <WebCore/NotImplemented.h>
#include <WebCore/UserAgent.h>
#if USE(ATK)
#include <atk/atk.h>
#endif
namespace WebKit {
void WebPageProxy::platformInitialize()
{
notImplemented();
}
struct wpe_view_backend* WebPageProxy::viewBackend()
{
return static_cast<PageClientImpl&>(pageClient()).viewBackend();
}
String WebPageProxy::userAgentForURL(const URL&)
{
return userAgent();
}
String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent)
{
return WebCore::standardUserAgent(applicationNameForUserAgent);
}
#if USE(ATK)
void WebPageProxy::bindAccessibilityTree(const String& plugID)
{
auto* accessible = static_cast<PageClientImpl&>(pageClient()).accessible();
atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data()));
atk_object_notify_state_change(accessible, ATK_STATE_TRANSIENT, FALSE);
}
#endif
void WebPageProxy::saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&)
{
notImplemented();
}
void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler)
{
notImplemented();
completionHandler({ });
}
void WebsiteDataStore::platformRemoveRecentSearches(WallTime)
{
notImplemented();
}
void WebPageProxy::updateEditorState(const EditorState& editorState)
{
m_editorState = editorState;
if (!editorState.shouldIgnoreSelectionChanges)
pageClient().selectionDidChange();
}
void WebPageProxy::sendMessageToWebViewWithReply(UserMessage&& message, CompletionHandler<void(UserMessage&&)>&& completionHandler)
{
static_cast<PageClientImpl&>(pageClient()).sendMessageToWebView(WTFMove(message), WTFMove(completionHandler));
}
void WebPageProxy::sendMessageToWebView(UserMessage&& message)
{
sendMessageToWebViewWithReply(WTFMove(message), [](UserMessage&&) { });
}
void WebPageProxy::setInputMethodState(Optional<InputMethodState>&& state)
{
static_cast<PageClientImpl&>(pageClient()).setInputMethodState(WTFMove(state));
}
}