From 6fa56d81afb43bc05a43f85f6f7402b88fc68aac Mon Sep 17 00:00:00 2001 From: Francis Tsui Date: Thu, 21 May 2026 14:31:18 -0700 Subject: [PATCH] Create separate WebRtc Platform. PiperOrigin-RevId: 919258148 --- internal/platform/implementation/BUILD | 20 ++++++++++++ .../platform/implementation/webrtc_platform.h | 31 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 internal/platform/implementation/webrtc_platform.h diff --git a/internal/platform/implementation/BUILD b/internal/platform/implementation/BUILD index c122ef11..d6188d88 100644 --- a/internal/platform/implementation/BUILD +++ b/internal/platform/implementation/BUILD @@ -87,6 +87,26 @@ cc_library( ], ) +cc_library( + name = "webrtc_platform", + hdrs = [ + "webrtc_platform.h", + ], + compatible_with = ["//buildenv/target:non_prod"], + visibility = [ + "//:__subpackages__", + ], + deps = [ + ":comm", + "//connections/implementation/proto:offline_wire_formats_cc_proto", + "//internal/platform:base", + # "//third_party/webrtc/files/stable/webrtc/api:libjingle_peerconnection_api", + # "//third_party/webrtc/files/stable/webrtc/api:scoped_refptr", + "@com_google_absl//absl/functional:any_invocable", + "@com_google_absl//absl/strings:string_view", + ], +) + cc_library( name = "comm", hdrs = [ diff --git a/internal/platform/implementation/webrtc_platform.h b/internal/platform/implementation/webrtc_platform.h new file mode 100644 index 00000000..6fdc3bbe --- /dev/null +++ b/internal/platform/implementation/webrtc_platform.h @@ -0,0 +1,31 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef PLATFORM_API_WEBRTC_PLATFORM_H_ +#define PLATFORM_API_WEBRTC_PLATFORM_H_ + +#include + +#include "internal/platform/implementation/webrtc.h" + +namespace nearby::api { + +class WebRtcImplementationPlatform { + public: + static std::unique_ptr CreateWebRtcMedium(); +}; + +} // namespace nearby::api + +#endif // PLATFORM_API_WEBRTC_PLATFORM_H_