Diff
Modified: branches/safari-604.1.21-branch/Source/WebCore/ChangeLog (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/ChangeLog 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/ChangeLog 2017-05-16 06:19:17 UTC (rev 216904)
@@ -1,3 +1,29 @@
+2017-05-15 Matthew Hanson <matthew_han...@apple.com>
+
+ Cherry-pick r216323. rdar://problem/31899730
+
+ 2017-05-06 Youenn Fablet <you...@apple.com>
+
+ RealtimeMediaSourceCenter callbacks should be passed as r-values
+ https://bugs.webkit.org/show_bug.cgi?id=171407
+
+ Reviewed by Eric Carlson.
+
+ No change of behavior, this is mostly style here.
+
+ * platform/mediastream/RealtimeMediaSourceCenter.h:
+ * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
+ (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
+ (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
+ * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
+ * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
+ (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
+ * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
+ * platform/mock/MockRealtimeMediaSourceCenter.cpp:
+ (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
+ (WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
+ * platform/mock/MockRealtimeMediaSourceCenter.h:
+
2017-05-12 Jason Marcell <jmarc...@apple.com>
Cherry-pick r216809. rdar://problem/32141005
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h 2017-05-16 06:19:17 UTC (rev 216904)
@@ -57,10 +57,10 @@
using ValidConstraintsHandler = std::function<void(const Vector<String>&& audioDeviceUIDs, const Vector<String>&& videoDeviceUIDs)>;
using InvalidConstraintsHandler = std::function<void(const String& invalidConstraint)>;
- virtual void validateRequestConstraints(ValidConstraintsHandler, InvalidConstraintsHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) = 0;
+ virtual void validateRequestConstraints(ValidConstraintsHandler&&, InvalidConstraintsHandler&&, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) = 0;
using NewMediaStreamHandler = std::function<void(RefPtr<MediaStreamPrivate>&&)>;
- virtual void createMediaStream(NewMediaStreamHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) = 0;
+ virtual void createMediaStream(NewMediaStreamHandler&&, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) = 0;
virtual Vector<CaptureDevice> getMediaStreamDevices() = 0;
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2017-05-16 06:19:17 UTC (rev 216904)
@@ -81,7 +81,7 @@
{
}
-void RealtimeMediaSourceCenterMac::validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
+void RealtimeMediaSourceCenterMac::validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
{
Vector<String> audioSourceUIDs;
Vector<String> videoSourceUIDs;
@@ -106,7 +106,7 @@
validHandler(WTFMove(audioSourceUIDs), WTFMove(videoSourceUIDs));
}
-void RealtimeMediaSourceCenterMac::createMediaStream(NewMediaStreamHandler completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints)
+void RealtimeMediaSourceCenterMac::createMediaStream(NewMediaStreamHandler&& completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints)
{
Vector<Ref<RealtimeMediaSource>> audioSources;
Vector<Ref<RealtimeMediaSource>> videoSources;
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h 2017-05-16 06:19:17 UTC (rev 216904)
@@ -50,8 +50,8 @@
RealtimeMediaSourceCenterMac();
~RealtimeMediaSourceCenterMac();
- void validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
- void createMediaStream(NewMediaStreamHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) final;
+ void validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
+ void createMediaStream(NewMediaStreamHandler&&, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) final;
Vector<CaptureDevice> getMediaStreamDevices() final;
Vector<String> bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type, const MediaConstraints&, String& invalidConstraint);
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp 2017-05-16 06:19:17 UTC (rev 216904)
@@ -77,7 +77,7 @@
{
}
-void RealtimeMediaSourceCenterOwr::validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
+void RealtimeMediaSourceCenterOwr::validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
{
m_validConstraintsHandler = WTFMove(validHandler);
m_invalidConstraintsHandler = WTFMove(invalidHandler);
@@ -99,7 +99,7 @@
m_invalidConstraintsHandler = nullptr;
}
-void RealtimeMediaSourceCenterOwr::createMediaStream(NewMediaStreamHandler completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints*, const MediaConstraints*)
+void RealtimeMediaSourceCenterOwr::createMediaStream(NewMediaStreamHandler&& completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints*, const MediaConstraints*)
{
int types = OWR_MEDIA_TYPE_UNKNOWN;
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h 2017-05-16 06:19:17 UTC (rev 216904)
@@ -53,9 +53,9 @@
RealtimeMediaSourceCenterOwr();
~RealtimeMediaSourceCenterOwr();
- void validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
+ void validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
- void createMediaStream(NewMediaStreamHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* videoConstraints, const MediaConstraints* audioConstraints) final;
+ void createMediaStream(NewMediaStreamHandler&&, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* videoConstraints, const MediaConstraints* audioConstraints) final;
Vector<CaptureDevice> getMediaStreamDevices() final;
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp 2017-05-16 06:19:17 UTC (rev 216904)
@@ -65,7 +65,7 @@
m_supportedConstraints.setSupportsDeviceId(true);
}
-void MockRealtimeMediaSourceCenter::validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
+void MockRealtimeMediaSourceCenter::validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints)
{
Vector<String> audioSourceIds;
Vector<String> videoSourceIds;
@@ -126,7 +126,7 @@
validHandler(WTFMove(audioSourceIds), WTFMove(videoSourceIds));
}
-void MockRealtimeMediaSourceCenter::createMediaStream(NewMediaStreamHandler completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints)
+void MockRealtimeMediaSourceCenter::createMediaStream(NewMediaStreamHandler&& completionHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints)
{
Vector<Ref<RealtimeMediaSource>> audioSources;
Vector<Ref<RealtimeMediaSource>> videoSources;
Modified: branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h (216903 => 216904)
--- branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h 2017-05-16 06:06:58 UTC (rev 216903)
+++ branches/safari-604.1.21-branch/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h 2017-05-16 06:19:17 UTC (rev 216904)
@@ -41,9 +41,9 @@
friend NeverDestroyed<MockRealtimeMediaSourceCenter>;
MockRealtimeMediaSourceCenter();
- void validateRequestConstraints(ValidConstraintsHandler validHandler, InvalidConstraintsHandler invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
+ void validateRequestConstraints(ValidConstraintsHandler&& validHandler, InvalidConstraintsHandler&& invalidHandler, const MediaConstraints& audioConstraints, const MediaConstraints& videoConstraints) final;
Vector<CaptureDevice> getMediaStreamDevices() final;
- void createMediaStream(NewMediaStreamHandler, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) final;
+ void createMediaStream(NewMediaStreamHandler&&, const String& audioDeviceID, const String& videoDeviceID, const MediaConstraints* audioConstraints, const MediaConstraints* videoConstraints) final;
RealtimeMediaSource::AudioCaptureFactory& defaultAudioFactory() final;
RealtimeMediaSource::VideoCaptureFactory& defaultVideoFactory() final;