WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-137765-20141029123427.patch (text/plain), 25.78 KB, created by
Gyuyoung Kim
on 2014-10-28 20:34:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gyuyoung Kim
Created:
2014-10-28 20:34:18 PDT
Size:
25.78 KB
patch
obsolete
>Subversion Revision: 175295 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index dd7695ffa4386248e7de274083938695f6e97028..c1b3bb06698324ec54fe248cd2e077c08450bd29 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,49 @@ >+2014-10-28 Gyuyoung Kim <gyuyoung.kim@samsung.com> >+ >+ Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes >+ https://bugs.webkit.org/show_bug.cgi?id=137765 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr with >+ std::unique_ptr<>|std::make_unique<>. However MediaPlayer has used factory pattern, thus create() factory >+ function should be kept to use factory pattern. Thus this patch sets contructor to private, and uses std::unique_ptr >+ in the create() factory functions. >+ >+ No new tests, no behavior changes. >+ >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::parseAttribute): >+ * html/HTMLMediaElement.h: >+ * platform/graphics/MediaPlayer.cpp: >+ (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate): >+ (WebCore::createNullMediaPlayer): >+ * platform/graphics/MediaPlayer.h: >+ (WebCore::MediaPlayer::create): >+ * platform/graphics/MediaPlayerPrivate.h: >+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: >+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: >+ (WebCore::MediaPlayerPrivateAVFoundationCF::create): >+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::create): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: >+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: >+ (WebCore::MediaPlayerPrivateGStreamer::create): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: >+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h: >+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: >+ (WebCore::MediaPlayerPrivateQTKit::create): >+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: >+ (WebCore::MediaPlayerPrivateMediaFoundation::create): >+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: >+ * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: >+ (WebCore::MockMediaPlayerMediaSource::create): >+ * platform/mock/mediasource/MockMediaPlayerMediaSource.h: >+ > 2014-10-28 Jer Noble <jer.noble@apple.com> > > [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time >diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in >index e2d852856f16a79e30dfd9abc06a5c8d6e9b4478..b187f7b763e09f2f1954ef29dadeed1e52fa0577 100644 >--- a/Source/WebCore/WebCore.exp.in >+++ b/Source/WebCore/WebCore.exp.in >@@ -3414,7 +3414,7 @@ __ZN7WebCore16HTMLMediaElement22clearMediaCacheForSiteERKN3WTF6StringE > __ZN7WebCore16HTMLMediaElement4playEv > __ZN7WebCore16HTMLMediaElement5pauseEv > __ZN7WebCore16HTMLMediaElement8setMutedEb >-__ZN7WebCore25MediaPlayerFactorySupport23callRegisterMediaEngineEPFvPFvPFN3WTF10PassOwnPtrINS_27MediaPlayerPrivateInterfaceEEEPNS_11MediaPlayerEEPFvRNS1_7HashSetINS1_6StringENS1_10StringHashENS1_10HashTraitsISA_EEEEEPFNS5_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNS1_6VectorISA_Lm0ENS1_15CrashOnOverflowEEEEPFvvEPFvRKSA_EPFbSX_SX_EEE >+__ZN7WebCore25MediaPlayerFactorySupport23callRegisterMediaEngineEPFvPFvPFNSt3__110unique_ptrINS_27MediaPlayerPrivateInterfaceENS1_14default_deleteIS3_EEEEPNS_11MediaPlayerEEPFvRN3WTF7HashSetINSB_6StringENSB_10StringHashENSB_10HashTraitsISD_EEEEEPFNS7_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNSB_6VectorISD_Lm0ENSB_15CrashOnOverflowEEEEPFvvEPFvRKSD_EPFbS10_S10_EEE > __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10TimeRangesE > __ZNK7WebCore10TimeRanges7nearestEd > __ZNK7WebCore16HTMLMediaElement11currentTimeEv >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index 474419983e32808428841bffac13557133705c8e..b22a2d5afdfa7864253e5d31f594dec65defcd71 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -4646,7 +4646,7 @@ void HTMLMediaElement::clearMediaPlayer(int flags) > m_mediaSession->setHasPlaybackTargetAvailabilityListeners(*this, false); > #endif > >- m_player.clear(); >+ m_player = nullptr; > > stopPeriodicTimers(); > m_loadTimer.stop(); >@@ -4693,7 +4693,7 @@ void HTMLMediaElement::stop() > // Once an active DOM object has been stopped it can not be restarted, so we can deallocate > // the media player now. Note that userCancelledLoad will already have cleared the player > // if the media was not fully loaded. This handles all other cases. >- m_player.clear(); >+ m_player = nullptr; > > updateSleepDisabling(); > } >diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h >index 8d93cf3fa129bd39b532d18559a9904742e7c50f..3ed2eab749f8021b804da39d38756e4a4ad9d420 100644 >--- a/Source/WebCore/html/HTMLMediaElement.h >+++ b/Source/WebCore/html/HTMLMediaElement.h >@@ -778,7 +778,7 @@ private: > MediaPlayer::VideoGravity m_videoFullscreenGravity; > #endif > >- OwnPtr<MediaPlayer> m_player; >+ std::unique_ptr<MediaPlayer> m_player; > > MediaPlayer::Preload m_preload; > >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.cpp b/Source/WebCore/platform/graphics/MediaPlayer.cpp >index ed9d8833641d53c98c73a664edc4c519eefb9f11..07cf504d5fc5a78cbd69fd51f7508c675b295903 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.cpp >+++ b/Source/WebCore/platform/graphics/MediaPlayer.cpp >@@ -78,7 +78,7 @@ const PlatformMedia NoPlatformMedia = { PlatformMedia::None, {0} }; > > class NullMediaPlayerPrivate : public MediaPlayerPrivateInterface { > public: >- NullMediaPlayerPrivate(MediaPlayer*) { } >+ explicit NullMediaPlayerPrivate(MediaPlayer*) { } > > virtual void load(const String&) { } > #if ENABLE(MEDIA_SOURCE) >@@ -144,12 +144,11 @@ public: > #endif > }; > >-static PassOwnPtr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player) >-{ >- return adoptPtr(new NullMediaPlayerPrivate(player)); >+static std::unique_ptr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player) >+{ >+ return std::unique_ptr<NullMediaPlayerPrivate>(new NullMediaPlayerPrivate(player)); > } > >- > // engine support > > struct MediaPlayerFactory { >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.h b/Source/WebCore/platform/graphics/MediaPlayer.h >index e2b2426d916cea3ed6d35a147ba4cf2fc7688977..3898bfb64511831aeb4fba0c6e21a468e81e2741 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.h >+++ b/Source/WebCore/platform/graphics/MediaPlayer.h >@@ -277,11 +277,11 @@ public: > class MediaPlayer { > WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED; > public: >- >- static PassOwnPtr<MediaPlayer> create(MediaPlayerClient& client) >+ static std::unique_ptr<MediaPlayer> create(MediaPlayerClient& client) > { >- return adoptPtr(new MediaPlayer(client)); >+ return std::unique_ptr<MediaPlayer>(new MediaPlayer(client)); > } >+ > virtual ~MediaPlayer(); > > // Media engine support. >@@ -577,7 +577,8 @@ public: > String sourceApplicationIdentifier() const; > > private: >- MediaPlayer(MediaPlayerClient&); >+ explicit MediaPlayer(MediaPlayerClient&); >+ > MediaPlayerFactory* nextBestMediaEngine(MediaPlayerFactory*) const; > void loadWithNextMediaEngine(MediaPlayerFactory*); > void reloadTimerFired(Timer<MediaPlayer>&); >@@ -586,7 +587,7 @@ private: > > MediaPlayerClient& m_client; > Timer<MediaPlayer> m_reloadTimer; >- OwnPtr<MediaPlayerPrivateInterface> m_private; >+ std::unique_ptr<MediaPlayerPrivateInterface> m_private; > MediaPlayerFactory* m_currentMediaEngine; > URL m_url; > String m_contentMIMEType; >@@ -608,7 +609,7 @@ private: > #endif > }; > >-typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*); >+typedef std::unique_ptr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*); > typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types); > typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const MediaEngineSupportParameters& parameters); > typedef void (*MediaEngineGetSitesInMediaCache)(Vector<String>&); >diff --git a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h b/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >index 0387a7d1528c4d58eb4356675b1d857ef56e60aa..431e01b876ec935b72da377e7962b1a10326b905 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >+++ b/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >@@ -31,7 +31,6 @@ > #include "MediaPlayer.h" > #include "PlatformTimeRanges.h" > #include <wtf/Forward.h> >-#include <wtf/OwnPtr.h> > > namespace WebCore { > >diff --git a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h b/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h >index 660b0c0025d1b7de7c5d75aa1bc75b888bc1fe85..d133efc1b8f553d331126d1591a6354840de98f3 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h >+++ b/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h >@@ -46,7 +46,6 @@ class GenericCueData; > class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface, public AVFInbandTrackParent > { > public: >- > virtual void repaint(); > virtual void metadataLoaded(); > virtual void playabilityKnown(); >@@ -144,7 +143,7 @@ public: > #endif > > protected: >- MediaPlayerPrivateAVFoundation(MediaPlayer*); >+ explicit MediaPlayerPrivateAVFoundation(MediaPlayer*); > virtual ~MediaPlayerPrivateAVFoundation(); > > WeakPtr<MediaPlayerPrivateAVFoundation> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); } >diff --git a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp b/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp >index 275d9e125d270a2ab5048ffefdfd5ca915106026..361959648a49120a0174e090ffe10c8c9490306f 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp >+++ b/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp >@@ -335,9 +335,9 @@ static dispatch_queue_t globalLoaderDelegateQueue() > } > #endif > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateAVFoundationCF(player)); >+ return std::unique_ptr<MediaPlayerPrivateAVFoundationCF>(new MediaPlayerPrivateAVFoundationCF(player)); > } > > void MediaPlayerPrivateAVFoundationCF::registerMediaEngine(MediaEngineRegistrar registrar) >diff --git a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h b/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h >index 2ac0144daa938cd2302c6b2d67dda303500847d3..89a504319817ac6dac57f33ba813539ba6a29fe1 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h >+++ b/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h >@@ -41,6 +41,8 @@ class WebCoreAVCFResourceLoader; > > class MediaPlayerPrivateAVFoundationCF : public MediaPlayerPrivateAVFoundation { > public: >+ // Engine support >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > virtual ~MediaPlayerPrivateAVFoundationCF(); > > virtual void tracksChanged() override; >@@ -58,10 +60,8 @@ public: > static void registerMediaEngine(MediaEngineRegistrar); > > private: >- MediaPlayerPrivateAVFoundationCF(MediaPlayer*); >+ explicit expliciMediaPlayerPrivateAVFoundationCF(MediaPlayer*); > >- // Engine support >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > static bool supportsKeySystem(const String& keySystem, const String& mimeType); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h >index f2b8e3b7a2ac0546853cf338967fb14b872a5846..e4bac871bffafe37901ec14071f337f18d74143a 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h >@@ -131,10 +131,10 @@ public: > WeakPtr<MediaPlayerPrivateAVFoundationObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); } > > private: >- MediaPlayerPrivateAVFoundationObjC(MediaPlayer*); >+ explicit MediaPlayerPrivateAVFoundationObjC(MediaPlayer*); > > // engine support >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > static bool supportsKeySystem(const String& keySystem, const String& mimeType); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index 6cee6a7487bd3041a950cc0443fb9bcdfa82bee3..4fc51bbc81ea3a26dc2d06138aef26515ba25564 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -383,9 +383,9 @@ static dispatch_queue_t globalPullDelegateQueue() > } > #endif > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateAVFoundationObjC(player)); >+ return std::unique_ptr<MediaPlayerPrivateAVFoundationObjC>(new MediaPlayerPrivateAVFoundationObjC(player)); > } > > void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistrar registrar) >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >index 077ac2e32c38eb7bd25239a024b3f775106957b1..34ae90395f804b05b55af577f8ddf98eb0a041eb 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h >@@ -50,13 +50,12 @@ class MediaSourcePrivateAVFObjC; > > class MediaPlayerPrivateMediaSourceAVFObjC : public MediaPlayerPrivateInterface { > public: >- MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*); > virtual ~MediaPlayerPrivateMediaSourceAVFObjC(); > > static void registerMediaEngine(MediaEngineRegistrar); > > // MediaPlayer Factory Methods >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static bool isAvailable(); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); >@@ -93,6 +92,8 @@ public: > WeakPtr<MediaPlayerPrivateMediaSourceAVFObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); } > > private: >+ explicit MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*); >+ > // MediaPlayerPrivateInterface > virtual void load(const String& url) override; > virtual void load(const String& url, MediaSourcePrivateClient*) override; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >index 7a12e81657fc2b9a00b16c4d42fcd4e13f26748b..aab09d18f839a5d4d6ba16a132fc4f8ba333e53a 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -206,9 +206,9 @@ void MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine(MediaEngineRegist > registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0); > } > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaSourceAVFObjC::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaSourceAVFObjC::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateMediaSourceAVFObjC(player)); >+ return std::unique_ptr<MediaPlayerPrivateMediaSourceAVFObjC>(new MediaPlayerPrivateMediaSourceAVFObjC(player)); > } > > bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable() >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 8ac8fccfbab3a1756d1972ed74c7d068de3d968f..093aff939c7bd75a9e36fae82aa38eb24900c042 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -138,9 +138,9 @@ void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object) > LOG_MEDIA_MESSAGE("Set media.role as %s at %s", role, elementName.get()); > } > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateGStreamer::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateGStreamer::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateGStreamer(player)); >+ return std::unique_ptr<MediaPlayerPrivateGStreamer>(new MediaPlayerPrivateGStreamer(player)); > } > > void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar) >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >index 5084921982c618432a1aa2f1ffa9c0f81c31ba76..be1aae846df37d05a4cc533401037a1651eff66d 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >@@ -57,7 +57,9 @@ class VideoTrackPrivateGStreamer; > > class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateGStreamerBase { > public: >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > ~MediaPlayerPrivateGStreamer(); >+ > static void registerMediaEngine(MediaEngineRegistrar); > gboolean handleMessage(GstMessage*); > void handlePluginInstallerResult(GstInstallPluginsReturn); >@@ -126,9 +128,7 @@ public: > bool changePipelineState(GstState); > > private: >- MediaPlayerPrivateGStreamer(MediaPlayer*); >- >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ explicit MediaPlayerPrivateGStreamer(MediaPlayer*); > > static void getSupportedTypes(HashSet<String>&); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); >diff --git a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >index 80c2cea5913a4252be1bdf2a730013e6a3a846f5..8863fd6097f468e5d36934222da3b309453c2097 100644 >--- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >+++ b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >@@ -50,6 +50,8 @@ namespace WebCore { > > class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface { > public: >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ > ~MediaPlayerPrivateQTKit(); > WEBCORE_EXPORT static void registerMediaEngine(MediaEngineRegistrar); > >@@ -63,10 +65,9 @@ public: > void layerHostChanged(PlatformLayer* rootLayer); > > private: >- MediaPlayerPrivateQTKit(MediaPlayer*); >+ explicit MediaPlayerPrivateQTKit(MediaPlayer*); > > // engine support >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > >diff --git a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm >index 90afc10fc34e39e7c9b1910d3cbf60afb827e2b1..1a995f3d197e267c7dc6001a29fcfc8fc6955ef8 100644 >--- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm >+++ b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm >@@ -166,9 +166,9 @@ using namespace WebCore; > > namespace WebCore { > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateQTKit::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateQTKit::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateQTKit(player)); >+ return std::unique_ptr<MediaPlayerPrivateQTKit>(new MediaPlayerPrivateQTKit(player)); > } > > void MediaPlayerPrivateQTKit::registerMediaEngine(MediaEngineRegistrar registrar) >diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >index 8a1cee6fb236ea3e8a6fdda2f10b1579f5b26c6e..af88bac717c01e738a0065ebf2bc407e68e02910 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >@@ -41,9 +41,9 @@ MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation(MediaPlayer > { > } > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateMediaFoundation(player)); >+ return std::unique_ptr<MediaPlayerPrivateMediaFoundation>(new MediaPlayerPrivateMediaFoundation(player)); > } > > void MediaPlayerPrivateMediaFoundation::registerMediaEngine(MediaEngineRegistrar registrar) >diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >index b9ae0c55d55faeebffe412a5afe1be54e79538a2..103b40221f61fe769d7a4d8febc2257cdbf443d7 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >@@ -30,10 +30,9 @@ namespace WebCore { > > class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface { > public: >- MediaPlayerPrivateMediaFoundation(MediaPlayer*); > static void registerMediaEngine(MediaEngineRegistrar); > >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > static bool isAvailable(); >@@ -67,7 +66,7 @@ public: > virtual void paint(GraphicsContext*, const IntRect&); > > private: >- >+ explicit MediaPlayerPrivateMediaFoundation(MediaPlayer*); > MediaPlayer* m_player; > > }; >diff --git a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >index c66178b9677cf84965d98bf88be3a3986f7e38da..f1a3f7e43fa195689dfa81f80613ef0b51967bf8 100644 >--- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >+++ b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >@@ -44,9 +44,9 @@ void MockMediaPlayerMediaSource::registerMediaEngine(MediaEngineRegistrar regist > registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0); > } > >-PassOwnPtr<MediaPlayerPrivateInterface> MockMediaPlayerMediaSource::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MockMediaPlayerMediaSource::create(MediaPlayer* player) > { >- return adoptPtr(new MockMediaPlayerMediaSource(player)); >+ return std::unique_ptr<MediaPlayerPrivateInterface>(new MockMediaPlayerMediaSource(player)); > } > > static HashSet<String> mimeTypeCache() >diff --git a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h >index b6694d8ed8737989eb0bf6eef963906365ffb97f..1a5f01fe6d22e29292dfb4913591ae2b159f5daf 100644 >--- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h >+++ b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h >@@ -40,7 +40,7 @@ class MockMediaPlayerMediaSource : public MediaPlayerPrivateInterface { > public: > // MediaPlayer Engine Support > static void registerMediaEngine(MediaEngineRegistrar); >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > >@@ -56,7 +56,7 @@ public: > void seekCompleted(); > > private: >- MockMediaPlayerMediaSource(MediaPlayer*); >+ explicit MockMediaPlayerMediaSource(MediaPlayer*); > > // MediaPlayerPrivate Overrides > virtual void load(const String& url) override;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 137765
:
239922
|
239924
|
239994
|
239998
|
240105
|
240202
|
240235
|
240253
|
240327
|
240331
|
240333
|
240335
|
240588
|
240590
|
240593
|
246713
|
246720
|
246728
|
246736
|
246944