Title: [202908] trunk/Source/WebCore
Revision
202908
Author
[email protected]
Date
2016-07-07 09:00:20 -0700 (Thu, 07 Jul 2016)

Log Message

Ownership between WebPlaybackSessionInterfaceMac and WebPlaybackControlsManager is backwards.
https://bugs.webkit.org/show_bug.cgi?id=159441

Reviewed by Eric Carlson.

The WebPlaybackControlsManager should own the WebPlaybackSessionInterfaceMac, and not
vice versa.

* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
(-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
* platform/mac/WebPlaybackSessionInterfaceMac.h:
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202907 => 202908)


--- trunk/Source/WebCore/ChangeLog	2016-07-07 14:29:25 UTC (rev 202907)
+++ trunk/Source/WebCore/ChangeLog	2016-07-07 16:00:20 UTC (rev 202908)
@@ -1,3 +1,21 @@
+2016-07-05  Jer Noble  <[email protected]>
+
+        Ownership between WebPlaybackSessionInterfaceMac and WebPlaybackControlsManager is backwards.
+        https://bugs.webkit.org/show_bug.cgi?id=159441
+
+        Reviewed by Eric Carlson.
+
+        The WebPlaybackControlsManager should own the WebPlaybackSessionInterfaceMac, and not
+        vice versa.
+
+        * platform/mac/WebPlaybackControlsManager.h:
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
+        (-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
+        * platform/mac/WebPlaybackSessionInterfaceMac.h:
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):
+
 2016-07-07  Eric Carlson  <[email protected]>
 
         Add a test for media control dropoff

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h (202907 => 202908)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2016-07-07 14:29:25 UTC (rev 202907)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2016-07-07 16:00:20 UTC (rev 202908)
@@ -53,10 +53,10 @@
     BOOL _canTogglePlayback;
 
 @private
-    WebCore::WebPlaybackSessionInterfaceMac* _webPlaybackSessionInterfaceMac;
+    RefPtr<WebCore::WebPlaybackSessionInterfaceMac> _webPlaybackSessionInterfaceMac;
 }
 
-@property (assign) WebCore::WebPlaybackSessionInterfaceMac* webPlaybackSessionInterfaceMac;
+@property (retain) WebCore::WebPlaybackSessionInterfaceMac* webPlaybackSessionInterfaceMac;
 @property (readwrite) NSTimeInterval contentDuration;
 @property (nonatomic, retain, readwrite) AVValueTiming *timing;
 @property (nonatomic, retain, readwrite) NSArray *seekableTimeRanges;

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (202907 => 202908)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2016-07-07 14:29:25 UTC (rev 202907)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2016-07-07 16:00:20 UTC (rev 202908)
@@ -33,7 +33,8 @@
 #else
 @implementation WebPlaybackControlsManager
 
-@synthesize webPlaybackSessionInterfaceMac=_webPlaybackSessionInterfaceMac;
+using namespace WebCore;
+
 @synthesize contentDuration=_contentDuration;
 @synthesize hasEnabledAudio=_hasEnabledAudio;
 @synthesize hasEnabledVideo=_hasEnabledVideo;
@@ -41,6 +42,18 @@
 @synthesize playing=_playing;
 @synthesize canTogglePlayback=_canTogglePlayback;
 
+@synthesize webPlaybackSessionInterfaceMac=_webPlaybackSessionInterfaceMac;
+
+- (WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
+{
+    return _webPlaybackSessionInterfaceMac.get();
+}
+
+- (void)setWebPlaybackSessionInterfaceMac:(WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
+{
+    _webPlaybackSessionInterfaceMac = webPlaybackSessionInterfaceMac;
+}
+
 - (AVValueTiming *)timing
 {
     return _timing.get();

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h (202907 => 202908)


--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h	2016-07-07 14:29:25 UTC (rev 202907)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h	2016-07-07 16:00:20 UTC (rev 202908)
@@ -79,7 +79,7 @@
 
 private:
     WebPlaybackSessionModel* m_playbackSessionModel { nullptr };
-    RetainPtr<WebPlaybackControlsManager> m_playbackControlsManager;
+    WebPlaybackControlsManager *m_playbackControlsManager;
     WebPlaybackSessionInterfaceMacClient* m_client { nullptr };
 };
 

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm (202907 => 202908)


--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2016-07-07 14:29:25 UTC (rev 202907)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2016-07-07 16:00:20 UTC (rev 202908)
@@ -137,7 +137,7 @@
 WebPlaybackControlsManager *WebPlaybackSessionInterfaceMac::playBackControlsManager()
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    return m_playbackControlsManager.get();
+    return m_playbackControlsManager;
 #else
     return nil;
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to