WebFullScreenManagerProxy.cpp [plain text]
#include "config.h"
#include "WebFullScreenManagerProxy.h"
#if ENABLE(FULLSCREEN_API)
#include "WebContext.h"
#include "WebFullScreenManagerMessages.h"
#include "WebFullScreenManagerProxyMessages.h"
namespace WebKit {
PassRefPtr<WebFullScreenManagerProxy> WebFullScreenManagerProxy::create(WebPageProxy* page)
{
return adoptRef(new WebFullScreenManagerProxy(page));
}
WebFullScreenManagerProxy::WebFullScreenManagerProxy(WebPageProxy* page)
: m_page(page)
, m_webView(0)
{
}
WebFullScreenManagerProxy::~WebFullScreenManagerProxy()
{
}
void WebFullScreenManagerProxy::setWebView(PlatformWebView* webView)
{
m_webView = webView;
}
void WebFullScreenManagerProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
didReceiveWebFullScreenManagerProxyMessage(connection, messageID, arguments);
}
CoreIPC::SyncReplyMode WebFullScreenManagerProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder* reply)
{
return didReceiveSyncWebFullScreenManagerProxyMessage(connection, messageID, arguments, reply);
}
void WebFullScreenManagerProxy::willEnterFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::WillEnterFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::didEnterFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::DidEnterFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::willExitFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::WillExitFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::didExitFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::DidExitFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::beginEnterFullScreenAnimation(float duration)
{
m_page->process()->send(Messages::WebFullScreenManager::BeginEnterFullScreenAnimation(duration), m_page->pageID());
}
void WebFullScreenManagerProxy::beginExitFullScreenAnimation(float duration)
{
m_page->process()->send(Messages::WebFullScreenManager::BeginExitFullScreenAnimation(duration), m_page->pageID());
}
void WebFullScreenManagerProxy::disposeOfLayerClient()
{
m_page->process()->send(Messages::WebFullScreenManager::DisposeOfLayerClient(), m_page->pageID());
}
void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supports)
{
if (withKeyboard)
supports = false;
else
supports = true;
}
}
#endif // ENABLE(FULLSCREEN_API)