Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2016 22:50:34 +0000 (22:50 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2016 22:50:34 +0000 (22:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157493

Reviewed by Dan Bernstein.

Source/WebCore:

* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm

index 7cfe33f..7a24190 100644 (file)
@@ -1,3 +1,14 @@
+2016-05-09  Ada Chan  <adachan@apple.com>
+
+        Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
+        https://bugs.webkit.org/show_bug.cgi?id=157493
+
+        Reviewed by Dan Bernstein.
+
+        * platform/mac/WebVideoFullscreenInterfaceMac.h:
+        * platform/mac/WebVideoFullscreenInterfaceMac.mm:
+        (WebCore::WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen):
+
 2016-05-09  Simon Fraser  <simon.fraser@apple.com>
 
         Clean up iOS text autosizing code
index 59f3968..2aa3cf4 100644 (file)
@@ -93,6 +93,8 @@ public:
     void setMode(HTMLMediaElementEnums::VideoFullscreenMode);
     void clearMode(HTMLMediaElementEnums::VideoFullscreenMode);
 
+    bool isPlayingVideoInEnhancedFullscreen() const;
+
     WEBCORE_EXPORT bool mayAutomaticallyShowVideoPictureInPicture() const { return false; }
     void applicationDidBecomeActive() { }
 
index 9b24ffd..80cffd1 100644 (file)
@@ -167,6 +167,11 @@ void WebVideoFullscreenInterfaceMac::setVideoDimensions(bool, float, float)
 {
 }
 
+bool WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() const
+{
+    return false;
+}
+
 bool supportsPictureInPicture()
 {
     return false;
index 64bee4e..388ae9d 100644 (file)
@@ -1,3 +1,13 @@
+2016-05-09  Ada Chan  <adachan@apple.com>
+
+        Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
+        https://bugs.webkit.org/show_bug.cgi?id=157493
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+        (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
+
 2016-05-06  Ada Chan  <adachan@apple.com>
 
         Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
index fdf078a..c4286bf 100644 (file)
@@ -250,11 +250,12 @@ bool WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture()
 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
 bool WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen() const
 {
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WebVideoFullscreenManagerProxyIsPlayingVideoInEnhancedFullscreenAdditions.mm>
-#else
+    for (auto& tuple : m_contextMap.values()) {
+        if (std::get<1>(tuple)->isPlayingVideoInEnhancedFullscreen())
+            return true;
+    }
+    
     return false;
-#endif
 }
 #endif