Commit dfcc6270 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Switch RTCRtpTransceiverPlatform away from WebString

BUG=787254
R=guidou@chromium.org

Change-Id: I8f8a15ebe099c20ec56adf54a90a3562ee26ee69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950683
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722438}
parent 94b651f0
......@@ -217,8 +217,8 @@ uintptr_t FakeRTCRtpTransceiverImpl::Id() const {
return 0u;
}
blink::WebString FakeRTCRtpTransceiverImpl::Mid() const {
return mid_ ? blink::WebString::FromUTF8(*mid_) : blink::WebString();
String FakeRTCRtpTransceiverImpl::Mid() const {
return mid_ ? String::FromUTF8(*mid_) : String();
}
std::unique_ptr<blink::RTCRtpSenderPlatform> FakeRTCRtpTransceiverImpl::Sender()
......
......@@ -102,7 +102,7 @@ class FakeRTCRtpTransceiverImpl : public RTCRtpTransceiverPlatform {
RTCRtpTransceiverPlatformImplementationType ImplementationType()
const override;
uintptr_t Id() const override;
blink::WebString Mid() const override;
String Mid() const override;
std::unique_ptr<blink::RTCRtpSenderPlatform> Sender() const override;
std::unique_ptr<RTCRtpReceiverPlatform> Receiver() const override;
bool Stopped() const override;
......
......@@ -216,7 +216,7 @@ class MockWebRTCPeerConnectionHandler::DummyRTCRtpTransceiverPlatform
return RTCRtpTransceiverPlatformImplementationType::kFullTransceiver;
}
uintptr_t Id() const override { return internal_->id(); }
WebString Mid() const override { return WebString(); }
String Mid() const override { return String(); }
std::unique_ptr<RTCRtpSenderPlatform> Sender() const override {
return internal_->Sender();
}
......
......@@ -335,9 +335,9 @@ uintptr_t RTCRtpReceiverOnlyTransceiver::Id() const {
return 0u;
}
blink::WebString RTCRtpReceiverOnlyTransceiver::Mid() const {
String RTCRtpReceiverOnlyTransceiver::Mid() const {
NOTIMPLEMENTED();
return blink::WebString();
return String();
}
std::unique_ptr<blink::RTCRtpSenderPlatform>
......
......@@ -153,7 +153,7 @@ class MODULES_EXPORT RTCRtpReceiverOnlyTransceiver
RTCRtpTransceiverPlatformImplementationType ImplementationType()
const override;
uintptr_t Id() const override;
blink::WebString Mid() const override;
String Mid() const override;
std::unique_ptr<blink::RTCRtpSenderPlatform> Sender() const override;
std::unique_ptr<RTCRtpReceiverPlatform> Receiver() const override;
bool Stopped() const override;
......
......@@ -516,9 +516,9 @@ uintptr_t RTCRtpSenderOnlyTransceiver::Id() const {
return 0u;
}
blink::WebString RTCRtpSenderOnlyTransceiver::Mid() const {
String RTCRtpSenderOnlyTransceiver::Mid() const {
NOTIMPLEMENTED();
return blink::WebString();
return String();
}
std::unique_ptr<blink::RTCRtpSenderPlatform>
......
......@@ -172,7 +172,7 @@ class MODULES_EXPORT RTCRtpSenderOnlyTransceiver
RTCRtpTransceiverPlatformImplementationType ImplementationType()
const override;
uintptr_t Id() const override;
WebString Mid() const override;
String Mid() const override;
std::unique_ptr<RTCRtpSenderPlatform> Sender() const override;
std::unique_ptr<RTCRtpReceiverPlatform> Receiver() const override;
bool Stopped() const override;
......
......@@ -345,13 +345,12 @@ uintptr_t RTCRtpTransceiverImpl::Id() const {
return GetId(internal_->state().webrtc_transceiver().get());
}
blink::WebString RTCRtpTransceiverImpl::Mid() const {
String RTCRtpTransceiverImpl::Mid() const {
const auto& mid = internal_->state().mid();
return mid ? blink::WebString::FromUTF8(*mid)
: blink::WebString(); // IsNull()
return mid ? String::FromUTF8(*mid) : String();
}
void RTCRtpTransceiverImpl::SetMid(base::Optional<blink::WebString> mid) {
void RTCRtpTransceiverImpl::SetMid(base::Optional<String> mid) {
internal_->set_mid(mid ? base::Optional<std::string>(mid->Utf8())
: base::nullopt);
}
......
......@@ -168,8 +168,8 @@ class MODULES_EXPORT RTCRtpTransceiverImpl : public RTCRtpTransceiverPlatform {
RTCRtpTransceiverPlatformImplementationType ImplementationType()
const override;
uintptr_t Id() const override;
blink::WebString Mid() const override;
void SetMid(base::Optional<blink::WebString>) override;
String Mid() const override;
void SetMid(base::Optional<String>) override;
std::unique_ptr<RTCRtpSenderPlatform> Sender() const override;
std::unique_ptr<RTCRtpReceiverPlatform> Receiver() const override;
bool Stopped() const override;
......
......@@ -8,9 +8,9 @@
#include <memory>
#include "base/optional.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_rtp_receiver_platform.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/webrtc/api/rtp_transceiver_interface.h"
namespace blink {
......@@ -51,8 +51,8 @@ class PLATFORM_EXPORT RTCRtpTransceiverPlatform {
// Identifies the webrtc-layer transceiver. Multiple RTCRtpTransceiverPlatform
// can exist for the same webrtc-layer transceiver.
virtual uintptr_t Id() const = 0;
virtual WebString Mid() const = 0;
virtual void SetMid(base::Optional<WebString>) {}
virtual String Mid() const = 0;
virtual void SetMid(base::Optional<String>) {}
virtual std::unique_ptr<RTCRtpSenderPlatform> Sender() const = 0;
virtual std::unique_ptr<RTCRtpReceiverPlatform> Receiver() const = 0;
virtual bool Stopped() const = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment