⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 202908 in webkit


Ignore:
Timestamp:
Jul 7, 2016, 9:00:20 AM (10 years ago)
Author:
jer.noble@apple.com
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):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r202905 r202908  
     12016-07-05  Jer Noble  <jer.noble@apple.com>
     2
     3        Ownership between WebPlaybackSessionInterfaceMac and WebPlaybackControlsManager is backwards.
     4        https://bugs.webkit.org/show_bug.cgi?id=159441
     5
     6        Reviewed by Eric Carlson.
     7
     8        The WebPlaybackControlsManager should own the WebPlaybackSessionInterfaceMac, and not
     9        vice versa.
     10
     11        * platform/mac/WebPlaybackControlsManager.h:
     12        * platform/mac/WebPlaybackControlsManager.mm:
     13        (-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
     14        (-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
     15        * platform/mac/WebPlaybackSessionInterfaceMac.h:
     16        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
     17        (WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):
     18
    1192016-07-07  Eric Carlson  <eric.carlson@apple.com>
    220
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h

    r201882 r202908  
    5454
    5555@private
    56     WebCore::WebPlaybackSessionInterfaceMac* _webPlaybackSessionInterfaceMac;
     56    RefPtr<WebCore::WebPlaybackSessionInterfaceMac> _webPlaybackSessionInterfaceMac;
    5757}
    5858
    59 @property (assign) WebCore::WebPlaybackSessionInterfaceMac* webPlaybackSessionInterfaceMac;
     59@property (retain) WebCore::WebPlaybackSessionInterfaceMac* webPlaybackSessionInterfaceMac;
    6060@property (readwrite) NSTimeInterval contentDuration;
    6161@property (nonatomic, retain, readwrite) AVValueTiming *timing;
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm

    r201882 r202908  
    3434@implementation WebPlaybackControlsManager
    3535
    36 @synthesize webPlaybackSessionInterfaceMac=_webPlaybackSessionInterfaceMac;
     36using namespace WebCore;
     37
    3738@synthesize contentDuration=_contentDuration;
    3839@synthesize hasEnabledAudio=_hasEnabledAudio;
     
    4142@synthesize playing=_playing;
    4243@synthesize canTogglePlayback=_canTogglePlayback;
     44
     45@synthesize webPlaybackSessionInterfaceMac=_webPlaybackSessionInterfaceMac;
     46
     47- (WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
     48{
     49    return _webPlaybackSessionInterfaceMac.get();
     50}
     51
     52- (void)setWebPlaybackSessionInterfaceMac:(WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
     53{
     54    _webPlaybackSessionInterfaceMac = webPlaybackSessionInterfaceMac;
     55}
    4356
    4457- (AVValueTiming *)timing
  • trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h

    r200254 r202908  
    8080private:
    8181    WebPlaybackSessionModel* m_playbackSessionModel { nullptr };
    82     RetainPtr<WebPlaybackControlsManager> m_playbackControlsManager;
     82    WebPlaybackControlsManager *m_playbackControlsManager;
    8383    WebPlaybackSessionInterfaceMacClient* m_client { nullptr };
    8484};
  • trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm

    r201882 r202908  
    138138{
    139139#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    140     return m_playbackControlsManager.get();
     140    return m_playbackControlsManager;
    141141#else
    142142    return nil;
Note: See TracChangeset for help on using the changeset viewer.