Cleanup webrtc files.

PiperOrigin-RevId: 918011253
This commit is contained in:
Francis Tsui
2026-05-19 13:55:05 -07:00
committed by Copybara-Service
parent 2a09838b61
commit 9e00f2ece8
13 changed files with 35 additions and 57 deletions
@@ -25,11 +25,9 @@ cc_library(
],
copts = ["-DNO_WEBRTC"],
deps = [
"//connections:core_types",
"//connections/implementation/mediums:webrtc_socket",
# "//third_party/webrtc/files/stable/webrtc/api:create_peerconnection_factory", # buildcleaner: keep
"//internal/platform:base",
# "//third_party/webrtc/files/stable/webrtc/api:jsep",
# "//third_party/webrtc/files/stable/webrtc/api:peer_connection_interface",
"@com_google_absl//absl/functional:any_invocable",
],
)
@@ -49,6 +47,11 @@ cc_library(
# "//third_party/webrtc/files/stable/webrtc/api:data_channel_interface",
# "//third_party/webrtc/files/stable/webrtc/api:jsep",
# "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api",
# "//third_party/webrtc/files/stable/webrtc/api:rtc_error",
# "//third_party/webrtc/files/stable/webrtc/api:scoped_refptr",
"//third_party/webrtc/files/stable/webrtc/rtc_base:network_constants",
"//third_party/webrtc/files/stable/webrtc/rtc_base:refcount",
"//third_party/webrtc/files/stable/webrtc/rtc_base:threading",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/memory",
@@ -72,9 +75,6 @@ cc_library(
name = "webrtc_socket_impl",
srcs = ["webrtc_socket_impl.cc"],
hdrs = ["webrtc_socket_impl.h"],
visibility = [
"//connections/implementation:__subpackages__",
],
deps = [
"//connections/implementation/mediums:webrtc_socket",
"//internal/platform:base",
@@ -92,7 +92,7 @@ cc_library(
srcs = ["webrtc_impl.cc"],
hdrs = ["webrtc_impl.h"],
visibility = [
"//connections/implementation:__subpackages__",
"//connections/implementation/mediums:__pkg__",
],
deps = [
":connection_flow",
@@ -128,7 +128,6 @@ cc_test(
],
shard_count = 16,
tags = [
"notsan", # NOTE(b/139734036): known data race in usrsctplib.
"requires-net:external",
],
deps = [
@@ -144,11 +143,12 @@ cc_test(
"//internal/platform:comm",
"//internal/platform:test_util",
"//internal/platform:types",
"//internal/platform/implementation/g3", # buildcleaner: keep
"//internal/platform/implementation:platform_impl",
"//internal/test",
# "//third_party/webrtc/files/stable/webrtc/api:data_channel_interface",
# "//third_party/webrtc/files/stable/webrtc/api:jsep",
# "//third_party/webrtc/files/stable/webrtc/api:scoped_refptr",
"//third_party/webrtc/files/stable/webrtc/rtc_base:refcount",
"@com_github_protobuf_matchers//protobuf-matchers",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/time",
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NO_WEBRTC
#include "connections/implementation/mediums/webrtc/connection_flow.h"
#include <iterator>
@@ -27,7 +25,6 @@
#include "connections/implementation/mediums/webrtc/local_ice_candidate_listener.h"
#include "connections/implementation/mediums/webrtc/session_description_wrapper.h"
#include "connections/implementation/mediums/webrtc/webrtc_socket_impl.h"
#include "connections/implementation/mediums/webrtc_socket.h"
#include "internal/platform/exception.h"
#include "internal/platform/future.h"
#include "internal/platform/logging.h"
@@ -36,6 +33,13 @@
#include "internal/platform/webrtc.h"
#include "webrtc/api/data_channel_interface.h"
#include "webrtc/api/jsep.h"
#include "webrtc/api/peer_connection_interface.h"
#include "webrtc/api/rtc_error.h"
#include "webrtc/api/scoped_refptr.h"
#include "webrtc/api/set_local_description_observer_interface.h"
#include "webrtc/api/set_remote_description_observer_interface.h"
#include "webrtc/rtc_base/ref_counted_object.h"
#include "webrtc/rtc_base/thread.h"
namespace nearby {
namespace connections {
@@ -579,5 +583,3 @@ ConnectionFlow::GetAndResetPeerConnection() {
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif
@@ -15,8 +15,6 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_CONNECTION_FLOW_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_CONNECTION_FLOW_H_
#ifndef NO_WEBRTC
#include <memory>
#include <vector>
@@ -34,7 +32,10 @@
#include "internal/platform/runnable.h"
#include "internal/platform/webrtc.h"
#include "webrtc/api/data_channel_interface.h"
#include "webrtc/api/jsep.h"
#include "webrtc/api/peer_connection_interface.h"
#include "webrtc/api/scoped_refptr.h"
#include "webrtc/rtc_base/network_constants.h"
namespace nearby {
namespace connections {
@@ -246,6 +247,4 @@ class ConnectionFlow : public webrtc::PeerConnectionObserver {
} // namespace connections
} // namespace nearby
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_CONNECTION_FLOW_H_
@@ -15,8 +15,6 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_DATA_CHANNEL_LISTENER_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_DATA_CHANNEL_LISTENER_H_
#ifndef NO_WEBRTC
#include <memory>
#include "absl/functional/any_invocable.h"
@@ -41,6 +39,4 @@ struct DataChannelListener {
} // namespace connections
} // namespace nearby
#endif // NO_WEBRTC
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_DATA_CHANNEL_LISTENER_H_
@@ -15,11 +15,9 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_LOCAL_ICE_CANDIDATE_LISTENER_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_LOCAL_ICE_CANDIDATE_LISTENER_H_
#ifndef NO_WEBRTC
#include "connections/listeners.h"
#include "absl/functional/any_invocable.h"
#include "internal/platform/listeners.h"
#include "webrtc/api/jsep.h"
#include "webrtc/api/peer_connection_interface.h"
namespace nearby {
namespace connections {
@@ -37,6 +35,4 @@ struct LocalIceCandidateListener {
} // namespace connections
} // namespace nearby
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_LOCAL_ICE_CANDIDATE_LISTENER_H_
@@ -15,9 +15,9 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_SESSION_DESCRIPTION_WRAPPER_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_SESSION_DESCRIPTION_WRAPPER_H_
#ifndef NO_WEBRTC
#include "webrtc/api/peer_connection_interface.h"
#include <memory>
#include <string>
#include "webrtc/api/jsep.h"
// Wrapper object around SessionDescriptionInterface*.
// This object owns the SessionDescriptionInterface* unless Release() has been
@@ -63,6 +63,4 @@ class SessionDescriptionWrapper {
std::unique_ptr<webrtc::SessionDescriptionInterface> impl_;
};
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_SESSION_DESCRIPTION_WRAPPER_H_
@@ -12,9 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NO_WEBRTC
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "connections/implementation/mediums/webrtc/signaling_frames.h"
#include "connections/implementation/mediums/webrtc_peer_id.h"
#include "internal/platform/byte_array.h"
#include "webrtc/api/jsep.h"
namespace nearby {
namespace connections {
@@ -131,5 +137,3 @@ location::nearby::mediums::IceCandidate EncodeIceCandidate(
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif
@@ -15,14 +15,13 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_SIGNALING_FRAMES_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_SIGNALING_FRAMES_H_
#ifndef NO_WEBRTC
#include <memory>
#include <vector>
#include "connections/implementation/mediums/webrtc_peer_id.h"
#include "internal/platform/byte_array.h"
#include "proto/mediums/web_rtc_signaling_frames.pb.h"
#include "webrtc/api/peer_connection_interface.h"
#include "webrtc/api/jsep.h"
namespace nearby {
namespace connections {
@@ -55,6 +54,4 @@ std::vector<std::unique_ptr<webrtc::IceCandidate>> DecodeIceCandidates(
} // namespace connections
} // namespace nearby
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_SIGNALING_FRAMES_H_
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NO_WEBRTC
#include "connections/implementation/mediums/webrtc/webrtc_impl.h"
#include <functional>
@@ -789,5 +787,3 @@ bool WebRtcImpl::IsUsingCellular() {
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif // NO_WEBRTC
@@ -15,8 +15,6 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_IMPL_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_IMPL_H_
#ifndef NO_WEBRTC
#include <map>
#include <memory>
#include <string>
@@ -249,6 +247,4 @@ class WebRtcImpl : public WebRtc {
} // namespace connections
} // namespace nearby
#endif // NO_WEBRTC
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_IMPL_H_
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NO_WEBRTC
#include "connections/implementation/mediums/webrtc/webrtc_socket_impl.h"
#include <cstdint>
@@ -203,5 +201,3 @@ void WebRtcSocketImpl::OffloadFromSignalingThread(Runnable runnable) {
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif // NO_WEBRTC
@@ -15,8 +15,6 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_SOCKET_IMPL_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_SOCKET_IMPL_H_
#ifndef NO_WEBRTC
#include <cstdint>
#include <memory>
#include <string>
@@ -131,6 +129,4 @@ class WebRtcSocketImpl : public WebRtcSocket,
} // namespace connections
} // namespace nearby
#endif // NO_WEBRTC
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_WEBRTC_SOCKET_IMPL_H_
@@ -24,6 +24,8 @@
#include "internal/platform/byte_array.h"
#include "internal/platform/exception.h"
#include "webrtc/api/data_channel_interface.h"
#include "webrtc/api/scoped_refptr.h"
#include "webrtc/rtc_base/ref_counted_object.h"
namespace nearby {
namespace connections {