WebFullScreenManagerProxy.h [plain text]
#ifndef WebFullScreenManagerProxy_h
#define WebFullScreenManagerProxy_h
#if ENABLE(FULLSCREEN_API)
#include "MessageReceiver.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class IntRect;
}
#if PLATFORM(MAC)
OBJC_CLASS WKView;
#elif PLATFORM(GTK)
typedef struct _WebKitWebViewBase WebKitWebViewBase;
#elif PLATFORM(QT)
class QQuickWebView;
#endif
namespace WebKit {
#if PLATFORM(MAC)
typedef WKView PlatformWebView;
#elif PLATFORM(QT)
typedef QQuickWebView PlatformWebView;
#elif PLATFORM(GTK)
typedef WebKitWebViewBase PlatformWebView;
#elif PLATFORM(EFL)
typedef Evas_Object PlatformWebView;
#endif
class WebPageProxy;
class LayerTreeContext;
class WebFullScreenManagerProxy : public RefCounted<WebFullScreenManagerProxy>, public CoreIPC::MessageReceiver {
public:
static PassRefPtr<WebFullScreenManagerProxy> create(WebPageProxy*);
virtual ~WebFullScreenManagerProxy();
void invalidate();
void setWebView(PlatformWebView*);
bool isFullScreen();
void close();
void willEnterFullScreen();
void didEnterFullScreen();
void willExitFullScreen();
void didExitFullScreen();
void setAnimatingFullScreen(bool);
void requestExitFullScreen();
void saveScrollPosition();
void restoreScrollPosition();
private:
explicit WebFullScreenManagerProxy(WebPageProxy*);
void supportsFullScreen(bool withKeyboard, bool&);
void enterFullScreen();
void exitFullScreen();
void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame);
void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame);
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
WebPageProxy* m_page;
PlatformWebView* m_webView;
#if PLATFORM(EFL)
bool m_hasRequestedFullScreen;
#endif
};
}
#endif // ENABLE(FULLSCREEN_API)
#endif // WebFullScreenManagerProxy_h