Remove rtc::Location from pc/proxy as unused
Bug: webrtc:11318
Change-Id: Ie1ec35a61f8ad029127d5feb824308d0297919ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271542
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37772}
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index db9fb5f..684f3ac 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -49,7 +49,6 @@
"../api:scoped_refptr",
"../api/task_queue",
"../rtc_base:event_tracer",
- "../rtc_base:location",
"../rtc_base:rtc_event",
"../rtc_base:stringutils",
"../rtc_base:threading",
diff --git a/pc/proxy.h b/pc/proxy.h
index 3877a6f..a8eb6b2 100644
--- a/pc/proxy.h
+++ b/pc/proxy.h
@@ -10,7 +10,6 @@
// This file contains Macros for creating proxies for webrtc MediaStream and
// PeerConnection classes.
-// TODO(deadbeef): Move this to pc/; this is part of the implementation.
// The proxied objects are initialized with either one or two thread
// objects that operations can be proxied to: The primary and secondary
@@ -68,7 +67,6 @@
#include "api/scoped_refptr.h"
#include "api/task_queue/task_queue_base.h"
#include "rtc_base/event.h"
-#include "rtc_base/location.h"
#include "rtc_base/message_handler.h"
#include "rtc_base/string_utils.h"
#include "rtc_base/system/rtc_export.h"
@@ -78,10 +76,6 @@
#define RTC_DISABLE_PROXY_TRACE_EVENTS
#endif
-namespace rtc {
-class Location;
-}
-
namespace webrtc {
namespace proxy_internal {
@@ -130,7 +124,7 @@
m_(m),
args_(std::forward_as_tuple(std::forward<Args>(args)...)) {}
- R Marshal(const rtc::Location& posted_from, rtc::Thread* t) {
+ R Marshal(rtc::Thread* t) {
if (t->IsCurrent()) {
Invoke(std::index_sequence_for<Args...>());
} else {
@@ -165,7 +159,7 @@
m_(m),
args_(std::forward_as_tuple(std::forward<Args>(args)...)) {}
- R Marshal(const rtc::Location& posted_from, rtc::Thread* t) {
+ R Marshal(rtc::Thread* t) {
if (t->IsCurrent()) {
Invoke(std::index_sequence_for<Args...>());
} else {
@@ -248,7 +242,7 @@
~class_name##ProxyWithInternal() { \
MethodCall<class_name##ProxyWithInternal, void> call( \
this, &class_name##ProxyWithInternal::DestroyInternal); \
- call.Marshal(RTC_FROM_HERE, destructor_thread()); \
+ call.Marshal(destructor_thread()); \
} \
\
private: \
@@ -267,7 +261,7 @@
~class_name##ProxyWithInternal() { \
MethodCall<class_name##ProxyWithInternal, void> call( \
this, &class_name##ProxyWithInternal::DestroyInternal); \
- call.Marshal(RTC_FROM_HERE, destructor_thread()); \
+ call.Marshal(destructor_thread()); \
} \
\
private: \
@@ -325,32 +319,32 @@
#endif // if defined(RTC_DISABLE_PROXY_TRACE_EVENTS)
-#define PROXY_METHOD0(r, method) \
- r method() override { \
- TRACE_BOILERPLATE(method); \
- MethodCall<C, r> call(c(), &C::method); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+#define PROXY_METHOD0(r, method) \
+ r method() override { \
+ TRACE_BOILERPLATE(method); \
+ MethodCall<C, r> call(c(), &C::method); \
+ return call.Marshal(primary_thread_); \
}
-#define PROXY_CONSTMETHOD0(r, method) \
- r method() const override { \
- TRACE_BOILERPLATE(method); \
- ConstMethodCall<C, r> call(c(), &C::method); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+#define PROXY_CONSTMETHOD0(r, method) \
+ r method() const override { \
+ TRACE_BOILERPLATE(method); \
+ ConstMethodCall<C, r> call(c(), &C::method); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_METHOD1(r, method, t1) \
r method(t1 a1) override { \
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1> call(c(), &C::method, std::move(a1)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_CONSTMETHOD1(r, method, t1) \
r method(t1 a1) const override { \
TRACE_BOILERPLATE(method); \
ConstMethodCall<C, r, t1> call(c(), &C::method, std::move(a1)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_METHOD2(r, method, t1, t2) \
@@ -358,7 +352,7 @@
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1, t2> call(c(), &C::method, std::move(a1), \
std::move(a2)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_METHOD3(r, method, t1, t2, t3) \
@@ -366,7 +360,7 @@
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1, t2, t3> call(c(), &C::method, std::move(a1), \
std::move(a2), std::move(a3)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_METHOD4(r, method, t1, t2, t3, t4) \
@@ -375,7 +369,7 @@
MethodCall<C, r, t1, t2, t3, t4> call(c(), &C::method, std::move(a1), \
std::move(a2), std::move(a3), \
std::move(a4)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
#define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5) \
@@ -384,36 +378,36 @@
MethodCall<C, r, t1, t2, t3, t4, t5> call(c(), &C::method, std::move(a1), \
std::move(a2), std::move(a3), \
std::move(a4), std::move(a5)); \
- return call.Marshal(RTC_FROM_HERE, primary_thread_); \
+ return call.Marshal(primary_thread_); \
}
// Define methods which should be invoked on the secondary thread.
-#define PROXY_SECONDARY_METHOD0(r, method) \
- r method() override { \
- TRACE_BOILERPLATE(method); \
- MethodCall<C, r> call(c(), &C::method); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+#define PROXY_SECONDARY_METHOD0(r, method) \
+ r method() override { \
+ TRACE_BOILERPLATE(method); \
+ MethodCall<C, r> call(c(), &C::method); \
+ return call.Marshal(secondary_thread_); \
}
-#define PROXY_SECONDARY_CONSTMETHOD0(r, method) \
- r method() const override { \
- TRACE_BOILERPLATE(method); \
- ConstMethodCall<C, r> call(c(), &C::method); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+#define PROXY_SECONDARY_CONSTMETHOD0(r, method) \
+ r method() const override { \
+ TRACE_BOILERPLATE(method); \
+ ConstMethodCall<C, r> call(c(), &C::method); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_METHOD1(r, method, t1) \
r method(t1 a1) override { \
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1> call(c(), &C::method, std::move(a1)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_CONSTMETHOD1(r, method, t1) \
r method(t1 a1) const override { \
TRACE_BOILERPLATE(method); \
ConstMethodCall<C, r, t1> call(c(), &C::method, std::move(a1)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_METHOD2(r, method, t1, t2) \
@@ -421,7 +415,7 @@
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1, t2> call(c(), &C::method, std::move(a1), \
std::move(a2)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_CONSTMETHOD2(r, method, t1, t2) \
@@ -429,7 +423,7 @@
TRACE_BOILERPLATE(method); \
ConstMethodCall<C, r, t1, t2> call(c(), &C::method, std::move(a1), \
std::move(a2)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_METHOD3(r, method, t1, t2, t3) \
@@ -437,7 +431,7 @@
TRACE_BOILERPLATE(method); \
MethodCall<C, r, t1, t2, t3> call(c(), &C::method, std::move(a1), \
std::move(a2), std::move(a3)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
#define PROXY_SECONDARY_CONSTMETHOD3(r, method, t1, t2) \
@@ -445,7 +439,7 @@
TRACE_BOILERPLATE(method); \
ConstMethodCall<C, r, t1, t2, t3> call(c(), &C::method, std::move(a1), \
std::move(a2), std::move(a3)); \
- return call.Marshal(RTC_FROM_HERE, secondary_thread_); \
+ return call.Marshal(secondary_thread_); \
}
// For use when returning purely const state (set during construction).