Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[GTK][WK2] Move WebFullScreenManagerProxyGtk logic to PageClientImpl
https://bugs.webkit.org/show_bug.cgi?id=125440

Reviewed by Martin Robinson.

Make PageClientImpl a WebFullScreenManagerProxyClient. This brings the GTK port in line
with changes in r160296 and fixes the WK2 build for that port.

* GNUmakefile.list.am:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:


Canonical link: https://commits.webkit.org/143518@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Dec 9, 2013
1 parent 97581d4 commit af722a2
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 87 deletions.
24 changes: 24 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,27 @@
2013-12-09 Zan Dobersek <zdobersek@igalia.com>

[GTK][WK2] Move WebFullScreenManagerProxyGtk logic to PageClientImpl
https://bugs.webkit.org/show_bug.cgi?id=125440

Reviewed by Martin Robinson.

Make PageClientImpl a WebFullScreenManagerProxyClient. This brings the GTK port in line
with changes in r160296 and fixes the WK2 build for that port.

* GNUmakefile.list.am:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:

2013-12-09 Brian Holt <brian.holt@samsung.com>

[WK2][Gtk] Add support for ENABLE_NETWORK_PROCESS to the build system
Expand Down
1 change: 0 additions & 1 deletion Source/WebKit2/GNUmakefile.list.am
Expand Up @@ -894,7 +894,6 @@ webkit2_sources += \
Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h \
Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.cpp \
Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.h \
Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp \
Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.cpp \
Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h \
Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp \
Expand Down
45 changes: 45 additions & 0 deletions Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
Expand Up @@ -289,4 +289,49 @@ void PageClientImpl::didCommitLoadForMainFrame()
notImplemented();
}

#if ENABLE(FULLSCREEN_API)
WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()
{
return *this;
}

void PageClientImpl::closeFullScreenManager()
{
notImplemented();
}

bool PageClientImpl::isFullScreen()
{
notImplemented();
return false;
}

void PageClientImpl::enterFullScreen()
{
if (!m_viewWidget)
return;

webkitWebViewBaseEnterFullScreen(WEBKIT_WEB_VIEW_BASE(m_viewWidget));
}

void PageClientImpl::exitFullScreen()
{
if (!m_viewWidget)
return;

webkitWebViewBaseExitFullScreen(WEBKIT_WEB_VIEW_BASE(m_viewWidget));
}

void PageClientImpl::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
notImplemented();
}

void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
notImplemented();
}

#endif // ENABLE(FULLSCREEN_API)

} // namespace WebKit
23 changes: 22 additions & 1 deletion Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
Expand Up @@ -31,6 +31,7 @@
#include "DefaultUndoController.h"
#include "KeyBindingTranslator.h"
#include "PageClient.h"
#include "WebFullScreenManagerProxy.h"
#include "WebPageProxy.h"
#include "WindowsKeyboardCodes.h"
#include <WebCore/IntSize.h>
Expand All @@ -41,7 +42,11 @@ namespace WebKit {
class DrawingAreaProxy;
class WebPageNamespace;

class PageClientImpl : public PageClient {
class PageClientImpl : public PageClient
#if ENABLE(FULLSCREEN_API)
, public WebFullScreenManagerProxyClient
#endif
{
public:
~PageClientImpl();
static PassOwnPtr<PageClientImpl> create(GtkWidget* viewWidget)
Expand All @@ -54,6 +59,7 @@ class PageClientImpl : public PageClient {
private:
explicit PageClientImpl(GtkWidget*);

// PageClient
virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() OVERRIDE;
virtual void setViewNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
virtual void displayView() OVERRIDE;
Expand Down Expand Up @@ -101,6 +107,21 @@ class PageClientImpl : public PageClient {
virtual void handleDownloadRequest(DownloadProxy*) OVERRIDE;
virtual void didCommitLoadForMainFrame() OVERRIDE;

// Auxiliary Client Creation
#if ENABLE(FULLSCREEN_API)
virtual WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() FINAL;
#endif

#if ENABLE(FULLSCREEN_API)
// WebFullScreenManagerProxyClient
virtual void closeFullScreenManager() OVERRIDE;
virtual bool isFullScreen() OVERRIDE;
virtual void enterFullScreen() OVERRIDE;
virtual void exitFullScreen() OVERRIDE;
virtual void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) OVERRIDE;
virtual void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) OVERRIDE;
#endif

// Members of PageClientImpl class
GtkWidget* m_viewWidget;
DefaultUndoController m_undoController;
Expand Down
4 changes: 0 additions & 4 deletions Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
Expand Up @@ -934,10 +934,6 @@ void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebCon
priv->pageProxy = context->createWebPage(*priv->pageClient, pageGroup);
priv->pageProxy->initializeWebPage();

#if ENABLE(FULLSCREEN_API)
priv->pageProxy->fullScreenManager()->setWebView(webkitWebViewBase);
#endif

#if USE(TEXTURE_MAPPER_GL)
if (priv->redirectedWindow)
priv->pageProxy->setAcceleratedCompositingWindowId(priv->redirectedWindow->windowId());
Expand Down
81 changes: 0 additions & 81 deletions Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp

This file was deleted.

0 comments on commit af722a2

Please sign in to comment.