Add a getter for WebVideoFullscreenInterfaceObjC and update its rate property
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2016 23:36:22 +0000 (23:36 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2016 23:36:22 +0000 (23:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155239

Reviewed by Eric Carlson.

* platform/mac/WebVideoFullscreenInterfaceMac.h:
Move the stub implementation of setVideoDimensions() to the mm file.
Declare a getter to WebVideoFullscreenInterfaceMacObjC.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
Also update the rate property of WebVideoFullscreenInterfaceMacObjC.
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
Stub implementation of setVideoDimensions() has been moved to here.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm

index 75979bc..2267510 100644 (file)
@@ -1,3 +1,19 @@
+2016-03-09  Ada Chan  <adachan@apple.com>
+
+        Add a getter for WebVideoFullscreenInterfaceObjC and update its rate property
+        https://bugs.webkit.org/show_bug.cgi?id=155239
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac/WebVideoFullscreenInterfaceMac.h:
+        Move the stub implementation of setVideoDimensions() to the mm file.
+        Declare a getter to WebVideoFullscreenInterfaceMacObjC.
+        * platform/mac/WebVideoFullscreenInterfaceMac.mm:
+        (WebCore::WebVideoFullscreenInterfaceMac::setRate):
+        Also update the rate property of WebVideoFullscreenInterfaceMacObjC.
+        (WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
+        Stub implementation of setVideoDimensions() has been moved to here.
+
 2016-03-09  Alex Christensen  <achristensen@webkit.org>
 
         Fix Mac build without video enabled after r197633.
index dada59e..9d1b9d1 100644 (file)
@@ -66,7 +66,7 @@ public:
     WEBCORE_EXPORT void setCurrentTime(double /*currentTime*/, double /*anchorTime*/) override;
     WEBCORE_EXPORT void setBufferedTime(double) override { }
     WEBCORE_EXPORT void setRate(bool /*isPlaying*/, float /*playbackRate*/) override;
-    WEBCORE_EXPORT void setVideoDimensions(bool /*hasVideo*/, float /*width*/, float /*height*/) override { }
+    WEBCORE_EXPORT void setVideoDimensions(bool hasVideo, float width, float height) final;
     WEBCORE_EXPORT void setSeekableRanges(const TimeRanges&) override;
     WEBCORE_EXPORT void setCanPlayFastReverse(bool) override { }
     WEBCORE_EXPORT void setAudioMediaSelectionOptions(const Vector<WTF::String>& /*options*/, uint64_t /*selectedIndex*/) override { }
@@ -94,6 +94,9 @@ public:
     void applicationDidBecomeActive() { }
 
     WEBCORE_EXPORT WebPlaybackControlsManager *playBackControlsManager();
+#if USE(APPLE_INTERNAL_SDK)
+    WEBCORE_EXPORT WebVideoFullscreenInterfaceMacObjC *videoFullscreenInterfaceObjC();
+#endif
 
 private:
     WebVideoFullscreenModel* m_videoFullscreenModel { nullptr };
index 756f4e6..3cc3363 100644 (file)
@@ -215,6 +215,10 @@ void WebVideoFullscreenInterfaceMac::setRate(bool isPlaying, float playbackRate)
     WebPlaybackControlsManager* controlsManager = playBackControlsManager();
 
     [controlsManager setRate:isPlaying ? playbackRate : 0.];
+
+#if USE(APPLE_INTERNAL_SDK)
+    [videoFullscreenInterfaceObjC() setRate:isPlaying ? playbackRate : 0.];
+#endif
 }
 
 void WebVideoFullscreenInterfaceMac::setSeekableRanges(const TimeRanges& timeRanges)
@@ -281,6 +285,10 @@ void WebVideoFullscreenInterfaceMac::setExternalPlayback(bool, ExternalPlaybackT
 {
 }
 
+void WebVideoFullscreenInterfaceMac::setVideoDimensions(bool, float, float)
+{
+}
+
 bool supportsPictureInPicture()
 {
     return false;