Commit 096f806b authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Switch renderer/modules/ away from base::RefCountedThreadSafe

Blink uses its own WTF::ThreadSafeRefCounted instead.

BUG=787254
R=guidou@chromium.org

Change-Id: I468ec63f649381e0d2bc3e9b76472992d87605ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887370
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712221}
parent c150ae4d
......@@ -11,7 +11,6 @@
#include "base/location.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "media/base/bind_to_current_loop.h"
#include "media/capture/video_capture_types.h"
......@@ -44,7 +43,7 @@ void ResetCallback(
// is disabled, a black frame is instead forwarded to the sinks at the same
// frame rate.
class MediaStreamVideoTrack::FrameDeliverer
: public base::RefCountedThreadSafe<FrameDeliverer> {
: public WTF::ThreadSafeRefCounted<FrameDeliverer> {
public:
using VideoSinkId = WebMediaStreamSink*;
......@@ -70,7 +69,7 @@ class MediaStreamVideoTrack::FrameDeliverer
base::TimeTicks estimated_capture_time);
private:
friend class base::RefCountedThreadSafe<FrameDeliverer>;
friend class WTF::ThreadSafeRefCounted<FrameDeliverer>;
virtual ~FrameDeliverer();
void AddCallbackOnIO(VideoSinkId id,
VideoCaptureDeliverFrameInternalCallback callback);
......
......@@ -15,6 +15,7 @@
#include "third_party/blink/public/platform/web_rtc_session_description.h"
#include "third_party/blink/public/platform/web_rtc_stats.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
#include "third_party/webrtc/api/stats/rtc_stats.h"
namespace blink {
......@@ -24,7 +25,7 @@ namespace {
// Having a refcounted helper class allows multiple DummyWebRTCRtpSender to
// share the same internal states.
class DummyRtpSenderInternal
: public base::RefCountedThreadSafe<DummyRtpSenderInternal> {
: public WTF::ThreadSafeRefCounted<DummyRtpSenderInternal> {
private:
static uintptr_t last_id_;
......@@ -46,7 +47,8 @@ uintptr_t DummyRtpSenderInternal::last_id_ = 0;
class DummyWebRTCRtpSender : public WebRTCRtpSender {
public:
explicit DummyWebRTCRtpSender(WebMediaStreamTrack track)
: internal_(new DummyRtpSenderInternal(std::move(track))) {}
: internal_(
base::MakeRefCounted<DummyRtpSenderInternal>(std::move(track))) {}
DummyWebRTCRtpSender(const DummyWebRTCRtpSender& other)
: internal_(other.internal_) {}
~DummyWebRTCRtpSender() override {}
......@@ -154,7 +156,7 @@ uintptr_t DummyWebRTCRtpReceiver::last_id_ = 0;
// Having a refcounted helper class allows multiple DummyWebRTCRtpTransceivers
// to share the same internal states.
class DummyTransceiverInternal
: public base::RefCountedThreadSafe<DummyTransceiverInternal> {
: public WTF::ThreadSafeRefCounted<DummyTransceiverInternal> {
private:
static uintptr_t last_id_;
......@@ -199,7 +201,8 @@ class MockWebRTCPeerConnectionHandler::DummyWebRTCRtpTransceiver
public:
DummyWebRTCRtpTransceiver(WebMediaStreamSource::Type type,
WebMediaStreamTrack track)
: internal_(new DummyTransceiverInternal(type, track)) {}
: internal_(base::MakeRefCounted<DummyTransceiverInternal>(type, track)) {
}
DummyWebRTCRtpTransceiver(const DummyWebRTCRtpTransceiver& other)
: internal_(other.internal_) {}
~DummyWebRTCRtpTransceiver() override {}
......
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