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

Unified Diff: webrtc/api/proxy.h

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: 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 51cdd296cf586563a571ecf3c1c723cd7f2e1a73..16c07c11a3f6e5b4ea7cc8d73b8cf698723d651c 100644
--- a/webrtc/api/proxy.h
+++ b/webrtc/api/proxy.h
@@ -432,16 +432,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() \
@@ -549,6 +549,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_); \
+ }
+
#define END_PROXY_MAP() \
} \
;

Powered by Google App Engine
This is Rietveld 408576698