Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2661)

Unified Diff: webrtc/api/proxy.h

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Some comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/proxy.h
diff --git a/webrtc/api/proxy.h b/webrtc/api/proxy.h
index 5634cfe9f843befd502c8509180c9788f497561c..7e27ded2cccd8710e37163837f7cc9f3d5b07f8f 100644
--- a/webrtc/api/proxy.h
+++ b/webrtc/api/proxy.h
@@ -438,16 +438,16 @@ class MethodCall5 : public rtc::Message,
worker_thread, c); \
}
-#define BEGIN_OWNED_PROXY_MAP(c) \
- PROXY_MAP_BOILERPLATE(c) \
- WORKER_PROXY_MAP_BOILERPLATE(c) \
- OWNED_PROXY_MAP_BOILERPLATE(c) \
- public: \
- static std::unique_ptr<c##ProxyWithInternal> Create( \
- rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \
- INTERNAL_CLASS* c) { \
- return std::unique_ptr<c##ProxyWithInternal>( \
- new c##ProxyWithInternal(signaling_thread, worker_thread, c)); \
+#define BEGIN_OWNED_PROXY_MAP(c) \
+ PROXY_MAP_BOILERPLATE(c) \
+ WORKER_PROXY_MAP_BOILERPLATE(c) \
+ OWNED_PROXY_MAP_BOILERPLATE(c) \
+ public: \
+ static std::unique_ptr<c##Interface> Create(rtc::Thread* signaling_thread, \
+ rtc::Thread* worker_thread, \
+ INTERNAL_CLASS* c) { \
+ return std::unique_ptr<c##Interface>( \
+ new c##ProxyWithInternal(signaling_thread, worker_thread, c)); \
}
#define PROXY_SIGNALING_THREAD_DESTRUCTOR() \
@@ -555,6 +555,20 @@ class MethodCall5 : public rtc::Message,
return call.Marshal(RTC_FROM_HERE, worker_thread_); \
}
+#define PROXY_WORKER_METHOD3(r, method, t1, t2, t3) \
+ r method(t1 a1, t2 a2, t3 a3) override { \
+ MethodCall3<C, r, t1, t2, t3> call(c_.get(), &C::method, std::move(a1), \
+ std::move(a2), std::move(a3)); \
+ return call.Marshal(RTC_FROM_HERE, worker_thread_); \
+ }
+
+#define PROXY_WORKER_CONSTMETHOD3(r, method, t1, t2) \
+ r method(t1 a1, t2 a2, t3 a3) const override { \
+ ConstMethodCall3<C, r, t1, t2, t3> call( \
+ c_.get(), &C::method, std::move(a1), std::move(a2), std::move(a3)); \
+ return call.Marshal(RTC_FROM_HERE, worker_thread_); \
+ }
+
} // namespace webrtc
#endif // WEBRTC_API_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698