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-20150217133014.patch (text/plain), 26.03 KB, created by
Gyuyoung Kim
on 2015-02-16 20:30:18 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gyuyoung Kim
Created:
2015-02-16 20:30:18 PST
Size:
26.03 KB
patch
obsolete
>Subversion Revision: 180141 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 64bfab64881e018dea03717fa6248e926e6af924..ca8d5ca8d8f89f050a2b21a023876f79136d2776 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,49 @@ >+2015-02-16 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: >+ > 2015-02-16 Milan Crha <mcrha@redhat.com> > > [GTK] Loading page into WebView shows g_closure_unref warning >diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in >index e62817dc57f88e1870147799d7545cb7d0d06210..701b0ce00495bc54ee05cec948f6c321914063a8 100644 >--- a/Source/WebCore/WebCore.exp.in >+++ b/Source/WebCore/WebCore.exp.in >@@ -3438,7 +3438,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 f7eb8fdb15192ca9b41747e8256b3a8001160837..9dab17e6166a2d1a852b88a3a11fe8eb5eb09635 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -4692,7 +4692,7 @@ void HTMLMediaElement::clearMediaPlayer(int flags) > m_mediaSession->setHasPlaybackTargetAvailabilityListeners(*this, false); > #endif > >- m_player.clear(); >+ m_player = nullptr; > > stopPeriodicTimers(); > m_loadTimer.stop(); >@@ -4739,7 +4739,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(); > } >@@ -5406,7 +5406,7 @@ void HTMLMediaElement::createMediaPlayer() > #if ENABLE(VIDEO_TRACK) > forgetResourceSpecificTracks(); > #endif >- m_player = MediaPlayer::create(*this); >+ m_player = std::make_unique<MediaPlayer>(static_cast<MediaPlayerClient&>(*this)); > > #if ENABLE(WEB_AUDIO) > if (m_audioSourceNode) { >diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h >index 4ab4760504f8f99cd3aa5e4f01e69adb42b98492..1fea42e1ed8fbe6e9cff378c172b24e4383f01a3 100644 >--- a/Source/WebCore/html/HTMLMediaElement.h >+++ b/Source/WebCore/html/HTMLMediaElement.h >@@ -805,7 +805,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 72f4f5a2e465c3f08dafe2c0a6df37aef9192d9c..56691ac4192bf1fdc4d776396cf6d53949df0a94 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.cpp >+++ b/Source/WebCore/platform/graphics/MediaPlayer.cpp >@@ -79,7 +79,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) >@@ -145,12 +145,11 @@ public: > #endif > }; > >-static PassOwnPtr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player) >-{ >- return adoptPtr(new NullMediaPlayerPrivate(player)); >+static std::unique_ptr<MediaPlayerPrivateInterface> createNullMediaPlayer(MediaPlayer* player) >+{ >+ return std::make_unique<NullMediaPlayerPrivate>(player); > } > >- > // engine support > > struct MediaPlayerFactory { >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.h b/Source/WebCore/platform/graphics/MediaPlayer.h >index 69b3cf934c53e3a59436131a3fac2d1a7053c49f..67d26d1b868208dc8eaad1e47f60e44ba1acb233 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.h >+++ b/Source/WebCore/platform/graphics/MediaPlayer.h >@@ -280,11 +280,7 @@ public: > class MediaPlayer { > WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED; > public: >- >- static PassOwnPtr<MediaPlayer> create(MediaPlayerClient& client) >- { >- return adoptPtr(new MediaPlayer(client)); >- } >+ explicit MediaPlayer(MediaPlayerClient&); > virtual ~MediaPlayer(); > > // Media engine support. >@@ -585,7 +581,6 @@ public: > String sourceApplicationIdentifier() const; > > private: >- MediaPlayer(MediaPlayerClient&); > const MediaPlayerFactory* nextBestMediaEngine(const MediaPlayerFactory*) const; > void loadWithNextMediaEngine(const MediaPlayerFactory*); > void reloadTimerFired(); >@@ -594,7 +589,7 @@ private: > > MediaPlayerClient& m_client; > Timer m_reloadTimer; >- OwnPtr<MediaPlayerPrivateInterface> m_private; >+ std::unique_ptr<MediaPlayerPrivateInterface> m_private; > const MediaPlayerFactory* m_currentMediaEngine; > URL m_url; > String m_contentMIMEType; >@@ -615,7 +610,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 c06acb473e5fcda0c35d7a553093de231b49b1ea..e0b53d16c1de12fd6392ccab50ee9acab3c57c17 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 7b558465bf3cb11b2c2c2b5dd97f851631f3d13c..a69807895cce49beaf9255cdf2a114f4149ba323 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 a34f0d467dd8d5ddd43c42d3e2bb878305001fa3..a57ec3e5b4fe2dc901561f1588935ac6c5d48e63 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) >-{ >- return adoptPtr(new MediaPlayerPrivateAVFoundationCF(player)); >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationCF::create(MediaPlayer* player) >+{ >+ return std::make_unique<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 b1cdcd00d9f02a0cca4ac8b1395d9e9a6f0ffb87..27e00335274b5fe39a197a2f2b863140725f37b2 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 >+ explicit MediaPlayerPrivateAVFoundationCF(MediaPlayer*); > virtual ~MediaPlayerPrivateAVFoundationCF(); > > virtual void tracksChanged() override; >@@ -58,10 +60,8 @@ public: > static void registerMediaEngine(MediaEngineRegistrar); > > private: >- MediaPlayerPrivateAVFoundationCF(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(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 0006c04e6b6112721cf002b8a5e3bdcd40a27fa2..bee5474c86a2fd3851a05cf1dbbef950551c3de6 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h >@@ -69,6 +69,7 @@ class VideoTrackPrivateAVFObjC; > > class MediaPlayerPrivateAVFoundationObjC : public MediaPlayerPrivateAVFoundation { > public: >+ explicit MediaPlayerPrivateAVFoundationObjC(MediaPlayer*); > virtual ~MediaPlayerPrivateAVFoundationObjC(); > > static void registerMediaEngine(MediaEngineRegistrar); >@@ -132,10 +133,8 @@ public: > WeakPtr<MediaPlayerPrivateAVFoundationObjC> createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); } > > private: >- 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 8a4d52e21a7028145946fa55fbc7c3455e9cbc2a..b37248a612925d12769fdb019509895ce72dc50e 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -387,9 +387,9 @@ static dispatch_queue_t globalPullDelegateQueue() > } > #endif > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player) >-{ >- return adoptPtr(new MediaPlayerPrivateAVFoundationObjC(player)); >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player) >+{ >+ return std::make_unique<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 e60176db5fed86da00d378e0f901f625f168c9e5..8a6e8d0dc12e8de7f35a924ab061145e7b21a2eb 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*); >+ explicit MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*); > virtual ~MediaPlayerPrivateMediaSourceAVFObjC(); > > static void registerMediaEngine(MediaEngineRegistrar); > > // MediaPlayer Factory Methods >- static PassOwnPtr<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: >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(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 f8ba2334ddca83acf3e66a5d2a5d0e9723c9d42b..3c86ef1f187d6c626dbe35641a4234eaa202aea4 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -207,9 +207,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::make_unique<MediaPlayerPrivateMediaSourceAVFObjC>(player); > } > > bool MediaPlayerPrivateMediaSourceAVFObjC::isAvailable() >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 943a2e78633a32350379e4ab3e3a8ded2d7c3933..e490bd76240fcd14e4a46f76d6821cc05aed3f17 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -142,9 +142,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::make_unique<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 391f8ea632ec2fc3af5127521289da804d3b14d5..ce6dadd8d1914c3673f130dcf7ad2c093ee2ab4b 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >@@ -62,7 +62,9 @@ class VideoTrackPrivateGStreamer; > > class MediaPlayerPrivateGStreamer : public MediaPlayerPrivateGStreamerBase { > public: >+ explicit MediaPlayerPrivateGStreamer(MediaPlayer*); > ~MediaPlayerPrivateGStreamer(); >+ > static void registerMediaEngine(MediaEngineRegistrar); > gboolean handleMessage(GstMessage*); > void handlePluginInstallerResult(GstInstallPluginsReturn); >@@ -136,9 +138,7 @@ public: > #endif > > private: >- MediaPlayerPrivateGStreamer(MediaPlayer*); >- >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(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 e7670450dc8755b1bf66787426fdb947811c31bf..317d3f5db34a9044d7664cfaa971fc401722b557 100644 >--- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >+++ b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >@@ -50,6 +50,7 @@ namespace WebCore { > > class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface { > public: >+ explicit MediaPlayerPrivateQTKit(MediaPlayer*); > ~MediaPlayerPrivateQTKit(); > WEBCORE_EXPORT static void registerMediaEngine(MediaEngineRegistrar); > >@@ -63,10 +64,9 @@ public: > void layerHostChanged(PlatformLayer* rootLayer); > > private: >- MediaPlayerPrivateQTKit(MediaPlayer*); >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(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 6b2ba4880b396c5ccbd8b403a3b7936c16aa6e29..d7e88f173ab4f0d965e5fd23f00e6d449d0f1b0e 100644 >--- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm >+++ b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm >@@ -168,9 +168,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::make_unique<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 ce8e33eef19b74bb998e278110d9e7094f9045ad..fc7ce9ce2993cdc9cc82b8238d390bb49e2e8105 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >@@ -65,9 +65,9 @@ MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation() > endSession(); > } > >-PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player) >+std::unique_ptr<MediaPlayerPrivateInterface> MediaPlayerPrivateMediaFoundation::create(MediaPlayer* player) > { >- return adoptPtr(new MediaPlayerPrivateMediaFoundation(player)); >+ return std::make_unique<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 eed8981a73fad2b9941f6af9d30bf9fc09a32aef..a49649d030c0ca3bea34461f63270e899ac34c08 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >@@ -35,11 +35,10 @@ namespace WebCore { > > class MediaPlayerPrivateMediaFoundation : public MediaPlayerPrivateInterface { > public: >- MediaPlayerPrivateMediaFoundation(MediaPlayer*); >+ explicit MediaPlayerPrivateMediaFoundation(MediaPlayer*); > ~MediaPlayerPrivateMediaFoundation(); > static void registerMediaEngine(MediaEngineRegistrar); > >- static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); > static void getSupportedTypes(HashSet<String>& types); > static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&); > static bool isAvailable(); >@@ -91,6 +90,8 @@ private: > COMPtr<IMFPresentationDescriptor> m_sourcePD; > COMPtr<IMFVideoDisplayControl> m_videoDisplay; > >+ static std::unique_ptr<MediaPlayerPrivateInterface> create(MediaPlayer*); >+ > bool createSession(); > bool endSession(); > bool startCreateMediaSource(const String& url); >diff --git a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >index db198989a5b90d6626f805bad8dcc180e7dcca02..2cbdcd26e4e7888c47979d591b6524b05020efb2 100644 >--- a/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >+++ b/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp >@@ -43,9 +43,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::make_unique<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 f93c8c8a5c444b8fa182238e525b020f92fa7f16..10f3f8f6b6f25688ac2dc3249fee91efa850da79 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 > WEBCORE_EXPORT 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