Title: [160303] trunk/Source/WebKit2
Revision
160303
Author
[email protected]
Date
2013-12-09 01:54:09 -0800 (Mon, 09 Dec 2013)

Log Message

[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:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160302 => 160303)


--- trunk/Source/WebKit2/ChangeLog	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-09 09:54:09 UTC (rev 160303)
@@ -1,3 +1,27 @@
+2013-12-09  Zan Dobersek  <[email protected]>
+
+        [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  <[email protected]>
 
         [WK2][Gtk] Add support for ENABLE_NETWORK_PROCESS to the build system

Modified: trunk/Source/WebKit2/GNUmakefile.list.am (160302 => 160303)


--- trunk/Source/WebKit2/GNUmakefile.list.am	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/GNUmakefile.list.am	2013-12-09 09:54:09 UTC (rev 160303)
@@ -894,7 +894,6 @@
 	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 \

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (160302 => 160303)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2013-12-09 09:54:09 UTC (rev 160303)
@@ -289,4 +289,49 @@
     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

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (160302 => 160303)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2013-12-09 09:54:09 UTC (rev 160303)
@@ -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>
@@ -41,7 +42,11 @@
 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)
@@ -54,6 +59,7 @@
 private:
     explicit PageClientImpl(GtkWidget*);
 
+    // PageClient
     virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() OVERRIDE;
     virtual void setViewNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
     virtual void displayView() OVERRIDE;
@@ -101,6 +107,21 @@
     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;

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (160302 => 160303)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2013-12-09 09:54:09 UTC (rev 160303)
@@ -934,10 +934,6 @@
     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());

Deleted: trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp (160302 => 160303)


--- trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp	2013-12-09 09:37:23 UTC (rev 160302)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp	2013-12-09 09:54:09 UTC (rev 160303)
@@ -1,81 +0,0 @@
-/*
- *  Copyright (C) 2011 Igalia S.L.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebFullScreenManagerProxy.h"
-
-#if ENABLE(FULLSCREEN_API)
-
-#include "WebContext.h"
-#include "WebFullScreenManagerMessages.h"
-#include "WebFullScreenManagerProxyMessages.h"
-#include "WebKitWebViewBasePrivate.h"
-#include "WebProcess.h"
-#include <WebCore/NotImplemented.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void WebFullScreenManagerProxy::invalidate()
-{
-    m_page->process().removeMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID());
-    m_webView = 0;
-}
-
-void WebFullScreenManagerProxy::close()
-{
-    notImplemented();
-}
-
-bool WebFullScreenManagerProxy::isFullScreen()
-{
-    notImplemented();
-    return false;
-}
-
-void WebFullScreenManagerProxy::enterFullScreen()
-{
-    if (!m_webView)
-        return;
-
-    webkitWebViewBaseEnterFullScreen(m_webView);
-}
-
-void WebFullScreenManagerProxy::exitFullScreen()
-{
-    if (!m_webView)
-        return;
-
-    webkitWebViewBaseExitFullScreen(m_webView);
-}
-
-void WebFullScreenManagerProxy::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
-{
-    notImplemented();
-}
-
-void WebFullScreenManagerProxy::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
-{
-    notImplemented();
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(FULLSCREEN_API)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to