WebFullScreenManager.h [plain text]
#pragma once
#if ENABLE(FULLSCREEN_API)
#include "WebCoreArgumentCoders.h"
#include <WebCore/IntRect.h>
#include <WebCore/LengthBox.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace IPC {
class Connection;
class Decoder;
}
namespace WebCore {
class IntRect;
class Element;
class GraphicsLayer;
class HTMLVideoElement;
}
namespace WebKit {
class WebPage;
class WebFullScreenManager : public RefCounted<WebFullScreenManager> {
public:
static Ref<WebFullScreenManager> create(WebPage*);
virtual ~WebFullScreenManager();
void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
bool supportsFullScreen(bool withKeyboard);
void enterFullScreenForElement(WebCore::Element*);
void exitFullScreenForElement(WebCore::Element*);
void willEnterFullScreen();
void didEnterFullScreen();
void willExitFullScreen();
void didExitFullScreen();
WebCore::Element* element();
void videoControlsManagerDidChange();
void close();
protected:
WebFullScreenManager(WebPage*);
void setPIPStandbyElement(WebCore::HTMLVideoElement*);
void setAnimatingFullScreen(bool);
void requestExitFullScreen();
void saveScrollPosition();
void restoreScrollPosition();
void setFullscreenInsets(const WebCore::FloatBoxExtent&);
void setFullscreenAutoHideDuration(Seconds);
void setFullscreenControlsHidden(bool);
void didReceiveWebFullScreenManagerMessage(IPC::Connection&, IPC::Decoder&);
WebCore::IntRect m_initialFrame;
WebCore::IntRect m_finalFrame;
WebCore::IntPoint m_scrollPosition;
float m_topContentInset { 0 };
RefPtr<WebPage> m_page;
RefPtr<WebCore::Element> m_element;
#if ENABLE(VIDEO)
RefPtr<WebCore::HTMLVideoElement> m_pipStandbyElement;
#endif
};
}
#endif // ENABLE(FULLSCREEN_API)