Non-inline functions that call CallbackList and are called from Chrome

This avoids problems with the Chrome component build.

Bug: webrtc:11943
Change-Id: I120628ee7829aa0255e60e2f21ac0608374340b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348723
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42146}
This commit is contained in:
Harald Alvestrand 2024-04-23 07:45:46 +00:00 committed by WebRTC LUCI CQ
parent 58cccc62cc
commit 00566ec1d0
2 changed files with 13 additions and 7 deletions

View File

@ -143,4 +143,14 @@ void IceTransportInternal::SetRemoteIceCredentials(absl::string_view ice_ufrag,
SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false));
}
void IceTransportInternal::AddGatheringStateCallback(
const void* removal_tag,
absl::AnyInvocable<void(IceTransportInternal*)> callback) {
gathering_state_callback_list_.AddReceiver(removal_tag, std::move(callback));
}
void IceTransportInternal::RemoveGatheringStateCallback(
const void* removal_tag) {
gathering_state_callback_list_.RemoveReceivers(removal_tag);
}
} // namespace cricket

View File

@ -306,15 +306,11 @@ class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal {
// Signal Exposed for backwards compatibility.
sigslot::signal1<IceTransportInternal*> SignalGatheringState;
// Note: These calls must not be inlined in order to avoid linking issues.
void AddGatheringStateCallback(
const void* removal_tag,
absl::AnyInvocable<void(IceTransportInternal*)> callback) {
gathering_state_callback_list_.AddReceiver(removal_tag,
std::move(callback));
}
void RemoveGatheringStateCallback(const void* removal_tag) {
gathering_state_callback_list_.RemoveReceivers(removal_tag);
}
absl::AnyInvocable<void(IceTransportInternal*)> callback);
void RemoveGatheringStateCallback(const void* removal_tag);
// Handles sending and receiving of candidates.
sigslot::signal2<IceTransportInternal*, const Candidate&>