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/rtpreceiverinterface.h b/webrtc/api/rtpreceiverinterface.h
index 53a3739..103df47 100644
--- a/webrtc/api/rtpreceiverinterface.h
+++ b/webrtc/api/rtpreceiverinterface.h
@@ -66,13 +66,14 @@
// Define proxy for RtpReceiverInterface.
BEGIN_SIGNALING_PROXY_MAP(RtpReceiver)
-PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
-PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-PROXY_CONSTMETHOD0(std::string, id)
-PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
-PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
-PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*);
-END_SIGNALING_PROXY()
+ PROXY_SIGNALING_THREAD_DESTRUCTOR()
+ PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
+ PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+ PROXY_CONSTMETHOD0(std::string, id)
+ PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
+ PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
+ PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*);
+END_PROXY_MAP()
} // namespace webrtc