Hook up fullscreenMayReturnToInline() in WKPageUIClient
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Feb 2016 22:37:15 +0000 (22:37 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Feb 2016 22:37:15 +0000 (22:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154661

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageUIClient.h

index 045a6c8..f26fb8d 100644 (file)
@@ -1,3 +1,14 @@
+2016-02-25  Ada Chan  <adachan@apple.com>
+
+        Hook up fullscreenMayReturnToInline() in WKPageUIClient
+        https://bugs.webkit.org/show_bug.cgi?id=154661
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageUIClient):
+        * UIProcess/API/C/WKPageUIClient.h:
+
 2016-02-25  Gavin Barraclough  <barraclough@apple.com>
 
         Should template RefCounter instead of RefCounter::Token
index 9fc89c2..d8e5763 100644 (file)
@@ -1735,6 +1735,14 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
             m_client.showPage(toAPI(page), m_client.base.clientInfo);
         }
 
+        virtual void fullscreenMayReturnToInline(WebPageProxy* page) override
+        {
+            if (!m_client.fullscreenMayReturnToInline)
+                return;
+
+            m_client.fullscreenMayReturnToInline(toAPI(page), m_client.base.clientInfo);
+        }
+
         virtual void close(WebPageProxy* page) override
         {
             if (!m_client.close)
index 5fdd3c4..e75ccfb 100644 (file)
@@ -102,6 +102,7 @@ typedef void (*WKPageDecidePolicyForUserMediaPermissionRequestCallback)(WKPageRe
 typedef void (*WKCheckUserMediaPermissionCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef userMediaDocumentOrigin, WKSecurityOriginRef topLevelDocumentOrigin, WKUserMediaPermissionCheckRef devicesRequest, const void *clientInfo);
 typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageMediaSessionMetadataDidChangeCallback)(WKPageRef page, WKMediaSessionMetadataRef metadata, const void* clientInfo);
+typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void* clientInfo);
 
 // Deprecated
 typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV0)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
@@ -632,6 +633,7 @@ typedef struct WKPageUIClientV7 {
 
     // Version 7.
     WKPageRunBeforeUnloadConfirmPanelCallback                           runBeforeUnloadConfirmPanel;
+    WKFullscreenMayReturnToInlineCallback                               fullscreenMayReturnToInline;
 } WKPageUIClientV7;
 
 #ifdef __cplusplus