Adding some features to proxy.h, and restructuring the macros.
New features are:
- Invoke a destructor on the worker thread.
- Make proxy wrapper for a non-refcounted object.
- Ability to use unique_ptrs (as arguments or return values).
These features are needed by this CL:
https://codereview.webrtc.org/2632613002/
BUG=None
Review-Url: https://codereview.webrtc.org/2628343003
Cr-Commit-Position: refs/heads/master@{#16151}
diff --git a/webrtc/api/rtpsenderinterface.h b/webrtc/api/rtpsenderinterface.h
index c940dc7..2e6b742 100644
--- a/webrtc/api/rtpsenderinterface.h
+++ b/webrtc/api/rtpsenderinterface.h
@@ -57,15 +57,16 @@
// Define proxy for RtpSenderInterface.
BEGIN_SIGNALING_PROXY_MAP(RtpSender)
-PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
-PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
-PROXY_CONSTMETHOD0(uint32_t, ssrc)
-PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-PROXY_CONSTMETHOD0(std::string, id)
-PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
-PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
-PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
-END_SIGNALING_PROXY()
+ PROXY_SIGNALING_THREAD_DESTRUCTOR()
+ PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
+ PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
+ PROXY_CONSTMETHOD0(uint32_t, ssrc)
+ PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+ PROXY_CONSTMETHOD0(std::string, id)
+ PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
+ PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
+ PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
+END_PROXY_MAP()
} // namespace webrtc