Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"

This reverts commit 3f87250a4f0e6c69002fbcdfb995b0dfcd7bf710.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a44cec2102fc8c3757d5bb814bd145f.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
diff --git a/api/DEPS b/api/DEPS
index 0b8a70e..ce88d34 100644
--- a/api/DEPS
+++ b/api/DEPS
@@ -112,14 +112,6 @@
     "+rtc_base/ref_count.h",
   ],
 
-  "jsep_ice_candidate\.h": [
-    "+rtc_base/constructor_magic.h",
-  ],
-
-  "jsep_session_description\.h": [
-    "+rtc_base/constructor_magic.h",
-  ],
-
   "media_stream_interface\.h": [
     "+modules/audio_processing/include/audio_processing_statistics.h",
     "+rtc_base/ref_count.h",
@@ -156,7 +148,6 @@
   ],
 
   "ref_counted_base\.h": [
-    "+rtc_base/constructor_magic.h",
     "+rtc_base/ref_count.h",
     "+rtc_base/ref_counter.h",
   ],
@@ -195,7 +186,6 @@
   ],
 
   "stats_types\.h": [
-    "+rtc_base/constructor_magic.h",
     "+rtc_base/ref_count.h",
     "+rtc_base/thread_checker.h",
   ],
@@ -204,17 +194,12 @@
     "+rtc_base/ref_count.h",
   ],
 
-  "audio_frame\.h": [
-    "+rtc_base/constructor_magic.h",
-  ],
-
   "audio_mixer\.h": [
     "+rtc_base/ref_count.h",
   ],
 
   "audio_decoder\.h": [
     "+rtc_base/buffer.h",
-    "+rtc_base/constructor_magic.h",
   ],
 
   "audio_decoder_factory\.h": [
diff --git a/call/adaptation/video_stream_adapter.cc b/call/adaptation/video_stream_adapter.cc
index 3d4c4dd..ce1c300 100644
--- a/call/adaptation/video_stream_adapter.cc
+++ b/call/adaptation/video_stream_adapter.cc
@@ -23,7 +23,6 @@
 #include "call/adaptation/video_source_restrictions.h"
 #include "call/adaptation/video_stream_input_state.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
 
diff --git a/common_audio/audio_converter.h b/common_audio/audio_converter.h
index e12e601..4afbb6d 100644
--- a/common_audio/audio_converter.h
+++ b/common_audio/audio_converter.h
@@ -15,8 +15,6 @@
 
 #include <memory>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 // Format conversion (remixing and resampling) for audio. Only simple remixing
@@ -35,6 +33,9 @@
                                                 size_t dst_frames);
   virtual ~AudioConverter() {}
 
+  AudioConverter(const AudioConverter&) = delete;
+  AudioConverter& operator=(const AudioConverter&) = delete;
+
   // Convert `src`, containing `src_size` samples, to `dst`, having a sample
   // capacity of `dst_capacity`. Both point to a series of buffers containing
   // the samples for each channel. The sizes must correspond to the format
@@ -64,8 +65,6 @@
   const size_t src_frames_;
   const size_t dst_channels_;
   const size_t dst_frames_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(AudioConverter);
 };
 
 }  // namespace webrtc
diff --git a/common_audio/resampler/push_sinc_resampler.h b/common_audio/resampler/push_sinc_resampler.h
index 88792d4..7946ef8 100644
--- a/common_audio/resampler/push_sinc_resampler.h
+++ b/common_audio/resampler/push_sinc_resampler.h
@@ -17,7 +17,6 @@
 #include <memory>
 
 #include "common_audio/resampler/sinc_resampler.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -33,6 +32,9 @@
   PushSincResampler(size_t source_frames, size_t destination_frames);
   ~PushSincResampler() override;
 
+  PushSincResampler(const PushSincResampler&) = delete;
+  PushSincResampler& operator=(const PushSincResampler&) = delete;
+
   // Perform the resampling. `source_frames` must always equal the
   // `source_frames` provided at construction. `destination_capacity` must be
   // at least as large as `destination_frames`. Returns the number of samples
@@ -72,8 +74,6 @@
 
   // Used to assert we are only requested for as much data as is available.
   size_t source_available_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PushSincResampler);
 };
 
 }  // namespace webrtc
diff --git a/common_audio/resampler/sinc_resampler.h b/common_audio/resampler/sinc_resampler.h
index d071e96..b89bba7 100644
--- a/common_audio/resampler/sinc_resampler.h
+++ b/common_audio/resampler/sinc_resampler.h
@@ -18,7 +18,6 @@
 
 #include <memory>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/gtest_prod_util.h"
 #include "rtc_base/memory/aligned_malloc.h"
 #include "rtc_base/system/arch.h"
@@ -64,6 +63,9 @@
                 SincResamplerCallback* read_cb);
   virtual ~SincResampler();
 
+  SincResampler(const SincResampler&) = delete;
+  SincResampler& operator=(const SincResampler&) = delete;
+
   // Resample `frames` of data from `read_cb_` into `destination`.
   void Resample(size_t frames, float* destination);
 
@@ -172,8 +174,6 @@
   float* const r2_;
   float* r3_;
   float* r4_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SincResampler);
 };
 
 }  // namespace webrtc
diff --git a/common_audio/resampler/sinusoidal_linear_chirp_source.h b/common_audio/resampler/sinusoidal_linear_chirp_source.h
index 8534119..a57cbfe 100644
--- a/common_audio/resampler/sinusoidal_linear_chirp_source.h
+++ b/common_audio/resampler/sinusoidal_linear_chirp_source.h
@@ -15,7 +15,6 @@
 #define COMMON_AUDIO_RESAMPLER_SINUSOIDAL_LINEAR_CHIRP_SOURCE_H_
 
 #include "common_audio/resampler/sinc_resampler.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -33,6 +32,10 @@
 
   ~SinusoidalLinearChirpSource() override {}
 
+  SinusoidalLinearChirpSource(const SinusoidalLinearChirpSource&) = delete;
+  SinusoidalLinearChirpSource& operator=(const SinusoidalLinearChirpSource&) =
+      delete;
+
   void Run(size_t frames, float* destination) override;
 
   double Frequency(size_t position);
@@ -46,8 +49,6 @@
   double k_;
   size_t current_index_;
   double delay_samples_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SinusoidalLinearChirpSource);
 };
 
 }  // namespace webrtc
diff --git a/examples/peerconnection/client/main.cc b/examples/peerconnection/client/main.cc
index 04a331d..32bc52b 100644
--- a/examples/peerconnection/client/main.cc
+++ b/examples/peerconnection/client/main.cc
@@ -23,7 +23,6 @@
 #include "examples/peerconnection/client/main_wnd.h"
 #include "examples/peerconnection/client/peer_connection_client.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ssl_adapter.h"
 #include "rtc_base/string_utils.h"  // For ToUtf8
 #include "rtc_base/win32_socket_init.h"
@@ -40,6 +39,9 @@
  public:
   WindowsCommandLineArguments();
 
+  WindowsCommandLineArguments(const WindowsCommandLineArguments&) = delete;
+  WindowsCommandLineArguments& operator=(WindowsCommandLineArguments&) = delete;
+
   int argc() { return argv_.size(); }
   char** argv() { return argv_.data(); }
 
@@ -48,9 +50,6 @@
   std::vector<std::string> args_;
   // Pointers, to get layout compatible with char** argv.
   std::vector<char*> argv_;
-
- private:
-  RTC_DISALLOW_COPY_AND_ASSIGN(WindowsCommandLineArguments);
 };
 
 WindowsCommandLineArguments::WindowsCommandLineArguments() {
diff --git a/logging/rtc_event_log/rtc_event_log_impl.cc b/logging/rtc_event_log/rtc_event_log_impl.cc
index 4237b2a..df59cba 100644
--- a/logging/rtc_event_log/rtc_event_log_impl.cc
+++ b/logging/rtc_event_log/rtc_event_log_impl.cc
@@ -22,7 +22,6 @@
 #include "logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h"
 #include "logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/event.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
diff --git a/media/base/media_engine.h b/media/base/media_engine.h
index 500e1ba..1778104 100644
--- a/media/base/media_engine.h
+++ b/media/base/media_engine.h
@@ -64,7 +64,9 @@
  public:
   VoiceEngineInterface() = default;
   virtual ~VoiceEngineInterface() = default;
-  RTC_DISALLOW_COPY_AND_ASSIGN(VoiceEngineInterface);
+
+  VoiceEngineInterface(const VoiceEngineInterface&) = delete;
+  VoiceEngineInterface& operator=(const VoiceEngineInterface&) = delete;
 
   // Initialization
   // Starts the engine.
@@ -98,7 +100,9 @@
  public:
   VideoEngineInterface() = default;
   virtual ~VideoEngineInterface() = default;
-  RTC_DISALLOW_COPY_AND_ASSIGN(VideoEngineInterface);
+
+  VideoEngineInterface(const VideoEngineInterface&) = delete;
+  VideoEngineInterface& operator=(const VideoEngineInterface&) = delete;
 
   // Creates a video media channel, paired with the specified voice channel.
   // Returns NULL on failure.
diff --git a/media/base/stream_params.h b/media/base/stream_params.h
index 1f46469..c9c8a09 100644
--- a/media/base/stream_params.h
+++ b/media/base/stream_params.h
@@ -54,7 +54,6 @@
 
 #include "absl/algorithm/container.h"
 #include "media/base/rid_description.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/unique_id_generator.h"
 
 namespace cricket {
diff --git a/media/base/video_adapter.h b/media/base/video_adapter.h
index 1bae10d..071330f 100644
--- a/media/base/video_adapter.h
+++ b/media/base/video_adapter.h
@@ -19,7 +19,6 @@
 #include "api/video/video_source_interface.h"
 #include "common_video/framerate_controller.h"
 #include "media/base/video_common.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/system/rtc_export.h"
 #include "rtc_base/thread_annotations.h"
@@ -38,6 +37,9 @@
   explicit VideoAdapter(int source_resolution_alignment);
   virtual ~VideoAdapter();
 
+  VideoAdapter(const VideoAdapter&) = delete;
+  VideoAdapter& operator=(const VideoAdapter&) = delete;
+
   // Return the adapted resolution and cropping parameters given the
   // input resolution. The input frame should first be cropped, then
   // scaled to the final output resolution. Returns true if the frame
@@ -146,8 +148,6 @@
 
   // The critical section to protect the above variables.
   mutable webrtc::Mutex mutex_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(VideoAdapter);
 };
 
 }  // namespace cricket
diff --git a/media/sctp/usrsctp_transport.h b/media/sctp/usrsctp_transport.h
index 06988fd..2dd6abf 100644
--- a/media/sctp/usrsctp_transport.h
+++ b/media/sctp/usrsctp_transport.h
@@ -22,7 +22,6 @@
 
 #include "absl/types/optional.h"
 #include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/copy_on_write_buffer.h"
 #include "rtc_base/task_utils/pending_task_safety_flag.h"
 #include "rtc_base/third_party/sigslot/sigslot.h"
@@ -76,6 +75,9 @@
                    rtc::PacketTransportInternal* transport);
   ~UsrsctpTransport() override;
 
+  UsrsctpTransport(const UsrsctpTransport&) = delete;
+  UsrsctpTransport& operator=(const UsrsctpTransport&) = delete;
+
   // SctpTransportInternal overrides (see sctptransportinternal.h for comments).
   void SetDtlsTransport(rtc::PacketTransportInternal* transport) override;
   bool Start(int local_port, int remote_port, int max_message_size) override;
@@ -285,8 +287,6 @@
   uintptr_t id_ = 0;
 
   friend class UsrsctpTransportMap;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(UsrsctpTransport);
 };
 
 class UsrsctpTransportMap;
diff --git a/media/sctp/usrsctp_transport_reliability_unittest.cc b/media/sctp/usrsctp_transport_reliability_unittest.cc
index a06d8d8..987dd04 100644
--- a/media/sctp/usrsctp_transport_reliability_unittest.cc
+++ b/media/sctp/usrsctp_transport_reliability_unittest.cc
@@ -58,6 +58,9 @@
     SignalWritableState(this);
   }
 
+  SimulatedPacketTransport(const SimulatedPacketTransport&) = delete;
+  SimulatedPacketTransport& operator=(const SimulatedPacketTransport&) = delete;
+
   const std::string& transport_name() const override { return transport_name_; }
 
   bool writable() const override { return destination_ != nullptr; }
@@ -129,7 +132,6 @@
   std::atomic<SimulatedPacketTransport*> destination_ ATOMIC_VAR_INIT(nullptr);
   webrtc::Random random_;
   webrtc::ScopedTaskSafety task_safety_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(SimulatedPacketTransport);
 };
 
 /**
@@ -156,6 +158,9 @@
     RTC_DCHECK(transport_);
   }
 
+  SctpDataSender(const SctpDataSender&) = delete;
+  SctpDataSender& operator=(const SctpDataSender&) = delete;
+
   void Start() {
     thread_->PostTask(ToQueuedTask(task_safety_.flag(), [this] {
       if (started_) {
@@ -236,7 +241,6 @@
   std::atomic<uint64_t> num_bytes_sent_ ATOMIC_VAR_INIT(0);
   absl::optional<std::string> last_error_;
   webrtc::ScopedTaskSafetyDetached task_safety_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(SctpDataSender);
 };
 
 /**
@@ -251,6 +255,9 @@
       : receiver_id_(receiver_id),
         target_messages_count_(target_messages_count) {}
 
+  SctpDataReceiver(const SctpDataReceiver&) = delete;
+  SctpDataReceiver& operator=(const SctpDataReceiver&) = delete;
+
   void OnDataReceived(const cricket::ReceiveDataParams& params,
                       const rtc::CopyOnWriteBuffer& data) {
     num_bytes_received_ += data.size();
@@ -278,7 +285,6 @@
   rtc::Event received_target_messages_count_{true, false};
   const uint32_t receiver_id_;
   const uint64_t target_messages_count_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(SctpDataReceiver);
 };
 
 /**
@@ -297,6 +303,9 @@
     }
   }
 
+  ThreadPool(const ThreadPool&) = delete;
+  ThreadPool& operator=(const ThreadPool&) = delete;
+
   rtc::Thread* GetRandomThread() {
     return threads_[random_.Rand(0U, threads_.size() - 1)].get();
   }
@@ -304,7 +313,6 @@
  private:
   webrtc::Random random_;
   std::vector<std::unique_ptr<rtc::Thread>> threads_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(ThreadPool);
 };
 
 /**
@@ -360,6 +368,9 @@
     });
   }
 
+  SctpPingPong(const SctpPingPong&) = delete;
+  SctpPingPong& operator=(const SctpPingPong&) = delete;
+
   bool Start() {
     CreateTwoConnectedSctpTransportsWithAllStreams();
 
@@ -577,7 +588,6 @@
   const uint8_t packet_loss_percents_;
   const uint16_t avg_send_delay_millis_;
   const webrtc::SendDataParams send_params_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(SctpPingPong);
 };
 
 /**
diff --git a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h
index 367f659..8fdf2f7 100644
--- a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h
+++ b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h
@@ -15,7 +15,6 @@
 
 #include "modules/audio_coding/audio_network_adaptor/controller.h"
 #include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 #include "rtc_base/system/file_wrapper.h"
 #if WEBRTC_ENABLE_PROTOBUF
diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc b/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
index a34c563..c688004 100644
--- a/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
+++ b/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
@@ -14,7 +14,6 @@
 #include <vector>
 
 #include "common_audio/vad/mock/mock_vad.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/numerics/safe_conversions.h"
 #include "test/gtest.h"
 #include "test/mock_audio_encoder.h"
@@ -50,6 +49,9 @@
     EXPECT_CALL(*mock_encoder_, NumChannels()).WillRepeatedly(Return(1));
   }
 
+  AudioEncoderCngTest(const AudioEncoderCngTest&) = delete;
+  AudioEncoderCngTest& operator=(const AudioEncoderCngTest&) = delete;
+
   void TearDown() override {
     EXPECT_CALL(*mock_vad_, Die()).Times(1);
     cng_.reset();
@@ -208,8 +210,6 @@
   rtc::Buffer encoded_;
   AudioEncoder::EncodedInfo encoded_info_;
   int sample_rate_hz_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderCngTest);
 };
 
 TEST_F(AudioEncoderCngTest, CreateAndDestroy) {
diff --git a/modules/audio_device/linux/latebindingsymboltable_linux.h b/modules/audio_device/linux/latebindingsymboltable_linux.h
index 6cfb659..9484b07 100644
--- a/modules/audio_device/linux/latebindingsymboltable_linux.h
+++ b/modules/audio_device/linux/latebindingsymboltable_linux.h
@@ -15,7 +15,6 @@
 #include <string.h>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 // This file provides macros for creating "symbol table" classes to simplify the
 // dynamic loading of symbols from DLLs. Currently the implementation only
@@ -55,6 +54,9 @@
 
   ~LateBindingSymbolTable() { Unload(); }
 
+  LateBindingSymbolTable(const LateBindingSymbolTable&) = delete;
+  LateBindingSymbolTable& operator=(LateBindingSymbolTable&) = delete;
+
   static int NumSymbols() { return SYMBOL_TABLE_SIZE; }
 
   // We do not use this, but we offer it for theoretical convenience.
@@ -109,8 +111,6 @@
   DllHandle handle_;
   bool undefined_symbols_;
   void* symbols_[SYMBOL_TABLE_SIZE];
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(LateBindingSymbolTable);
 };
 
 // This macro must be invoked in a header to declare a symbol table class.
diff --git a/modules/audio_processing/aec3/comfort_noise_generator.h b/modules/audio_processing/aec3/comfort_noise_generator.h
index 16eaf355..2785b76 100644
--- a/modules/audio_processing/aec3/comfort_noise_generator.h
+++ b/modules/audio_processing/aec3/comfort_noise_generator.h
@@ -19,7 +19,6 @@
 #include "modules/audio_processing/aec3/aec3_common.h"
 #include "modules/audio_processing/aec3/aec_state.h"
 #include "modules/audio_processing/aec3/fft_data.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/arch.h"
 
 namespace webrtc {
diff --git a/modules/audio_processing/aec3/echo_audibility.h b/modules/audio_processing/aec3/echo_audibility.h
index 1ffc017..b9d6f87 100644
--- a/modules/audio_processing/aec3/echo_audibility.h
+++ b/modules/audio_processing/aec3/echo_audibility.h
@@ -19,7 +19,6 @@
 #include "modules/audio_processing/aec3/render_buffer.h"
 #include "modules/audio_processing/aec3/spectrum_buffer.h"
 #include "modules/audio_processing/aec3/stationarity_estimator.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
diff --git a/modules/audio_processing/aec3/filter_analyzer.h b/modules/audio_processing/aec3/filter_analyzer.h
index b0b7070..e05fb71 100644
--- a/modules/audio_processing/aec3/filter_analyzer.h
+++ b/modules/audio_processing/aec3/filter_analyzer.h
@@ -20,7 +20,6 @@
 #include "api/array_view.h"
 #include "api/audio/echo_canceller3_config.h"
 #include "modules/audio_processing/aec3/aec3_common.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
diff --git a/modules/audio_processing/agc2/limiter.h b/modules/audio_processing/agc2/limiter.h
index f8894a3..669e202 100644
--- a/modules/audio_processing/agc2/limiter.h
+++ b/modules/audio_processing/agc2/limiter.h
@@ -17,7 +17,6 @@
 #include "modules/audio_processing/agc2/fixed_digital_level_estimator.h"
 #include "modules/audio_processing/agc2/interpolated_gain_curve.h"
 #include "modules/audio_processing/include/audio_frame_view.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 class ApmDataDumper;
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index 492b53a..03c193d 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -30,7 +30,6 @@
 #include "modules/audio_processing/optionally_built_submodule_creators.h"
 #include "rtc_base/atomic_ops.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/ref_counted_object.h"
 #include "rtc_base/time_utils.h"
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 4d567ca..b7e2841 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -30,7 +30,6 @@
 #include "api/scoped_refptr.h"
 #include "modules/audio_processing/include/audio_processing_statistics.h"
 #include "rtc_base/arraysize.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ref_count.h"
 #include "rtc_base/system/file_wrapper.h"
 #include "rtc_base/system/rtc_export.h"
diff --git a/modules/audio_processing/test/conversational_speech/simulator.cc b/modules/audio_processing/test/conversational_speech/simulator.cc
index 20c8608..c0fb589 100644
--- a/modules/audio_processing/test/conversational_speech/simulator.cc
+++ b/modules/audio_processing/test/conversational_speech/simulator.cc
@@ -22,7 +22,6 @@
 #include "common_audio/include/audio_util.h"
 #include "common_audio/wav_file.h"
 #include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
 #include "test/testsupport/file_utils.h"
diff --git a/modules/audio_processing/test/conversational_speech/simulator.h b/modules/audio_processing/test/conversational_speech/simulator.h
index a9992eb..2584782 100644
--- a/modules/audio_processing/test/conversational_speech/simulator.h
+++ b/modules/audio_processing/test/conversational_speech/simulator.h
@@ -17,7 +17,6 @@
 #include <utility>
 
 #include "modules/audio_processing/test/conversational_speech/multiend_call.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 namespace test {
diff --git a/modules/desktop_capture/desktop_frame_win.h b/modules/desktop_capture/desktop_frame_win.h
index 73e8648..f8faad6 100644
--- a/modules/desktop_capture/desktop_frame_win.h
+++ b/modules/desktop_capture/desktop_frame_win.h
@@ -16,7 +16,6 @@
 #include <memory>
 
 #include "modules/desktop_capture/desktop_frame.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -26,6 +25,9 @@
  public:
   ~DesktopFrameWin() override;
 
+  DesktopFrameWin(const DesktopFrameWin&) = delete;
+  DesktopFrameWin& operator=(const DesktopFrameWin&) = delete;
+
   static std::unique_ptr<DesktopFrameWin>
   Create(DesktopSize size, SharedMemoryFactory* shared_memory_factory, HDC hdc);
 
@@ -40,8 +42,6 @@
 
   HBITMAP bitmap_;
   std::unique_ptr<SharedMemory> owned_shared_memory_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h
index 79bdf03..7663cb6 100644
--- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h
+++ b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.h
@@ -15,7 +15,6 @@
 #include "modules/desktop_capture/desktop_capturer.h"
 #include "modules/desktop_capture/linux/wayland/screencast_portal.h"
 #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -25,6 +24,9 @@
   BaseCapturerPipeWire(const DesktopCaptureOptions& options);
   ~BaseCapturerPipeWire() override;
 
+  BaseCapturerPipeWire(const BaseCapturerPipeWire&) = delete;
+  BaseCapturerPipeWire& operator=(const BaseCapturerPipeWire&) = delete;
+
   // DesktopCapturer interface.
   void Start(Callback* delegate) override;
   void CaptureFrame() override;
@@ -42,8 +44,6 @@
   Callback* callback_ = nullptr;
   bool capturer_failed_ = false;
   std::unique_ptr<ScreenCastPortal> screencast_portal_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(BaseCapturerPipeWire);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/screen_capturer_x11.h b/modules/desktop_capture/linux/x11/screen_capturer_x11.h
index ebf18a4..d2a437a 100644
--- a/modules/desktop_capture/linux/x11/screen_capturer_x11.h
+++ b/modules/desktop_capture/linux/x11/screen_capturer_x11.h
@@ -29,7 +29,6 @@
 #include "modules/desktop_capture/screen_capture_frame_queue.h"
 #include "modules/desktop_capture/screen_capturer_helper.h"
 #include "modules/desktop_capture/shared_desktop_frame.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -46,6 +45,9 @@
   ScreenCapturerX11();
   ~ScreenCapturerX11() override;
 
+  ScreenCapturerX11(const ScreenCapturerX11&) = delete;
+  ScreenCapturerX11& operator=(const ScreenCapturerX11&) = delete;
+
   static std::unique_ptr<DesktopCapturer> CreateRawScreenCapturer(
       const DesktopCaptureOptions& options);
 
@@ -138,8 +140,6 @@
   DesktopRegion last_invalid_region_;
 
   std::unique_ptr<XAtomCache> atom_cache_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerX11);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/shared_x_display.h b/modules/desktop_capture/linux/x11/shared_x_display.h
index 13e1c8d..6405c36 100644
--- a/modules/desktop_capture/linux/x11/shared_x_display.h
+++ b/modules/desktop_capture/linux/x11/shared_x_display.h
@@ -17,7 +17,6 @@
 
 #include "api/ref_counted_base.h"
 #include "api/scoped_refptr.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/rtc_export.h"
 
 // Including Xlib.h will involve evil defines (Bool, Status, True, False), which
@@ -65,6 +64,9 @@
 
   ~SharedXDisplay();
 
+  SharedXDisplay(const SharedXDisplay&) = delete;
+  SharedXDisplay& operator=(const SharedXDisplay&) = delete;
+
  protected:
   // Takes ownership of `display`.
   explicit SharedXDisplay(Display* display);
@@ -75,8 +77,6 @@
   Display* display_;
 
   EventHandlersMap event_handlers_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SharedXDisplay);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/window_capturer_x11.h b/modules/desktop_capture/linux/x11/window_capturer_x11.h
index f15b147..ac591c2 100644
--- a/modules/desktop_capture/linux/x11/window_capturer_x11.h
+++ b/modules/desktop_capture/linux/x11/window_capturer_x11.h
@@ -25,7 +25,6 @@
 #include "modules/desktop_capture/linux/x11/window_finder_x11.h"
 #include "modules/desktop_capture/linux/x11/x_atom_cache.h"
 #include "modules/desktop_capture/linux/x11/x_server_pixel_buffer.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -35,6 +34,9 @@
   explicit WindowCapturerX11(const DesktopCaptureOptions& options);
   ~WindowCapturerX11() override;
 
+  WindowCapturerX11(const WindowCapturerX11&) = delete;
+  WindowCapturerX11& operator=(const WindowCapturerX11&) = delete;
+
   static std::unique_ptr<DesktopCapturer> CreateRawWindowCapturer(
       const DesktopCaptureOptions& options);
 
@@ -65,8 +67,6 @@
   XServerPixelBuffer x_server_pixel_buffer_;
   XAtomCache atom_cache_;
   WindowFinderX11 window_finder_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerX11);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/window_list_utils.cc b/modules/desktop_capture/linux/x11/window_list_utils.cc
index a366f9e..ff2d467 100644
--- a/modules/desktop_capture/linux/x11/window_list_utils.cc
+++ b/modules/desktop_capture/linux/x11/window_list_utils.cc
@@ -19,7 +19,6 @@
 #include "modules/desktop_capture/linux/x11/x_error_trap.h"
 #include "modules/desktop_capture/linux/x11/x_window_property.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 
 namespace webrtc {
diff --git a/modules/desktop_capture/linux/x11/x_error_trap.h b/modules/desktop_capture/linux/x11/x_error_trap.h
index ceb660c..882d690 100644
--- a/modules/desktop_capture/linux/x11/x_error_trap.h
+++ b/modules/desktop_capture/linux/x11/x_error_trap.h
@@ -13,8 +13,6 @@
 
 #include <X11/Xlib.h>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 // Helper class that registers X Window error handler. Caller can use
@@ -24,14 +22,15 @@
   explicit XErrorTrap(Display* display);
   ~XErrorTrap();
 
+  XErrorTrap(const XErrorTrap&) = delete;
+  XErrorTrap& operator=(const XErrorTrap&) = delete;
+
   // Returns last error and removes unregisters the error handler.
   int GetLastErrorAndDisable();
 
  private:
   XErrorHandler original_error_handler_;
   bool enabled_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(XErrorTrap);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h b/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h
index 84e1de3..38af3a3 100644
--- a/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h
+++ b/modules/desktop_capture/linux/x11/x_server_pixel_buffer.h
@@ -20,7 +20,6 @@
 #include <vector>
 
 #include "modules/desktop_capture/desktop_geometry.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -34,6 +33,9 @@
   XServerPixelBuffer();
   ~XServerPixelBuffer();
 
+  XServerPixelBuffer(const XServerPixelBuffer&) = delete;
+  XServerPixelBuffer& operator=(const XServerPixelBuffer&) = delete;
+
   void Release();
 
   // Allocate (or reallocate) the pixel buffer for `window`. Returns false in
@@ -80,8 +82,6 @@
   GC shm_gc_ = nullptr;
   bool xshm_get_image_succeeded_ = false;
   std::vector<uint8_t> icc_profile_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(XServerPixelBuffer);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/linux/x11/x_window_property.h b/modules/desktop_capture/linux/x11/x_window_property.h
index 71cbf06..28dfb973 100644
--- a/modules/desktop_capture/linux/x11/x_window_property.h
+++ b/modules/desktop_capture/linux/x11/x_window_property.h
@@ -14,8 +14,6 @@
 #include <X11/X.h>
 #include <X11/Xlib.h>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 class XWindowPropertyBase {
@@ -26,6 +24,9 @@
                       int expected_size);
   virtual ~XWindowPropertyBase();
 
+  XWindowPropertyBase(const XWindowPropertyBase&) = delete;
+  XWindowPropertyBase& operator=(const XWindowPropertyBase&) = delete;
+
   // True if we got properly value successfully.
   bool is_valid() const { return is_valid_; }
 
@@ -38,8 +39,6 @@
  private:
   bool is_valid_ = false;
   unsigned long size_ = 0;  // NOLINT: type required by XGetWindowProperty
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(XWindowPropertyBase);
 };
 
 // Convenience wrapper for XGetWindowProperty() results.
@@ -50,12 +49,13 @@
       : XWindowPropertyBase(display, window, property, sizeof(PropertyType)) {}
   ~XWindowProperty() override = default;
 
+  XWindowProperty(const XWindowProperty&) = delete;
+  XWindowProperty& operator=(const XWindowProperty&) = delete;
+
   const PropertyType* data() const {
     return reinterpret_cast<PropertyType*>(data_);
   }
   PropertyType* data() { return reinterpret_cast<PropertyType*>(data_); }
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(XWindowProperty);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/mac/screen_capturer_mac.mm b/modules/desktop_capture/mac/screen_capturer_mac.mm
index f10111a..6348491 100644
--- a/modules/desktop_capture/mac/screen_capturer_mac.mm
+++ b/modules/desktop_capture/mac/screen_capturer_mac.mm
@@ -15,7 +15,6 @@
 #include "modules/desktop_capture/mac/desktop_frame_provider.h"
 #include "modules/desktop_capture/mac/window_list_utils.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/time_utils.h"
 #include "rtc_base/trace_event.h"
diff --git a/modules/desktop_capture/screen_capturer_integration_test.cc b/modules/desktop_capture/screen_capturer_integration_test.cc
index 8350ff6..b33427a 100644
--- a/modules/desktop_capture/screen_capturer_integration_test.cc
+++ b/modules/desktop_capture/screen_capturer_integration_test.cc
@@ -25,7 +25,6 @@
 #include "modules/desktop_capture/rgba_color.h"
 #include "modules/desktop_capture/screen_drawer.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/third_party/base64/base64.h"
 #include "test/gmock.h"
diff --git a/modules/desktop_capture/win/desktop.h b/modules/desktop_capture/win/desktop.h
index 382df60..01bed85 100644
--- a/modules/desktop_capture/win/desktop.h
+++ b/modules/desktop_capture/win/desktop.h
@@ -15,7 +15,6 @@
 
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/rtc_export.h"
 
 namespace webrtc {
@@ -24,6 +23,9 @@
  public:
   ~Desktop();
 
+  Desktop(const Desktop&) = delete;
+  Desktop& operator=(const Desktop&) = delete;
+
   // Returns the name of the desktop represented by the object. Return false if
   // quering the name failed for any reason.
   bool GetName(std::wstring* desktop_name_out) const;
@@ -56,8 +58,6 @@
 
   // True if `desktop_` must be closed on teardown.
   bool own_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(Desktop);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/win/scoped_gdi_object.h b/modules/desktop_capture/win/scoped_gdi_object.h
index d3ac9b9..2b01941 100644
--- a/modules/desktop_capture/win/scoped_gdi_object.h
+++ b/modules/desktop_capture/win/scoped_gdi_object.h
@@ -13,8 +13,6 @@
 
 #include <windows.h>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 namespace win {
 
@@ -27,6 +25,9 @@
 
   ~ScopedGDIObject() { Traits::Close(handle_); }
 
+  ScopedGDIObject(const ScopedGDIObject&) = delete;
+  ScopedGDIObject& operator=(const ScopedGDIObject&) = delete;
+
   T Get() { return handle_; }
 
   void Set(T object) {
@@ -50,8 +51,6 @@
 
  private:
   T handle_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScopedGDIObject);
 };
 
 // The traits class that uses DeleteObject() to close a handle.
diff --git a/modules/desktop_capture/win/scoped_thread_desktop.h b/modules/desktop_capture/win/scoped_thread_desktop.h
index 04abaaf..98f151a 100644
--- a/modules/desktop_capture/win/scoped_thread_desktop.h
+++ b/modules/desktop_capture/win/scoped_thread_desktop.h
@@ -15,7 +15,6 @@
 
 #include <memory>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/rtc_export.h"
 
 namespace webrtc {
@@ -27,6 +26,9 @@
   ScopedThreadDesktop();
   ~ScopedThreadDesktop();
 
+  ScopedThreadDesktop(const ScopedThreadDesktop&) = delete;
+  ScopedThreadDesktop& operator=(const ScopedThreadDesktop&) = delete;
+
   // Returns true if `desktop` has the same desktop name as the currently
   // assigned desktop (if assigned) or as the initial desktop (if not assigned).
   // Returns false in any other case including failing Win32 APIs and
@@ -46,8 +48,6 @@
 
   // The desktop handle assigned to the calling thread at creation.
   std::unique_ptr<Desktop> initial_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScopedThreadDesktop);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/win/screen_capturer_win_directx.h b/modules/desktop_capture/win/screen_capturer_win_directx.h
index 2d0fce6..d64913e 100644
--- a/modules/desktop_capture/win/screen_capturer_win_directx.h
+++ b/modules/desktop_capture/win/screen_capturer_win_directx.h
@@ -23,7 +23,6 @@
 #include "modules/desktop_capture/screen_capture_frame_queue.h"
 #include "modules/desktop_capture/win/dxgi_duplicator_controller.h"
 #include "modules/desktop_capture/win/dxgi_frame.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/rtc_export.h"
 
 namespace webrtc {
@@ -74,6 +73,9 @@
 
   ~ScreenCapturerWinDirectx() override;
 
+  ScreenCapturerWinDirectx(const ScreenCapturerWinDirectx&) = delete;
+  ScreenCapturerWinDirectx& operator=(const ScreenCapturerWinDirectx&) = delete;
+
   // DesktopCapturer implementation.
   void Start(Callback* callback) override;
   void SetSharedMemoryFactory(
@@ -88,8 +90,6 @@
   std::unique_ptr<SharedMemoryFactory> shared_memory_factory_;
   Callback* callback_ = nullptr;
   SourceId current_screen_id_ = kFullDesktopScreenId;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.h b/modules/desktop_capture/win/screen_capturer_win_gdi.h
index e006c79..7c3977e 100644
--- a/modules/desktop_capture/win/screen_capturer_win_gdi.h
+++ b/modules/desktop_capture/win/screen_capturer_win_gdi.h
@@ -20,7 +20,6 @@
 #include "modules/desktop_capture/shared_desktop_frame.h"
 #include "modules/desktop_capture/win/display_configuration_monitor.h"
 #include "modules/desktop_capture/win/scoped_thread_desktop.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -35,6 +34,9 @@
   explicit ScreenCapturerWinGdi(const DesktopCaptureOptions& options);
   ~ScreenCapturerWinGdi() override;
 
+  ScreenCapturerWinGdi(const ScreenCapturerWinGdi&) = delete;
+  ScreenCapturerWinGdi& operator=(const ScreenCapturerWinGdi&) = delete;
+
   // Overridden from ScreenCapturer:
   void Start(Callback* callback) override;
   void SetSharedMemoryFactory(
@@ -74,8 +76,6 @@
 
   HMODULE dwmapi_library_ = NULL;
   DwmEnableCompositionFunc composition_func_ = nullptr;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/win/screen_capturer_win_magnifier.h b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
index 29966e9..07c5b1e 100644
--- a/modules/desktop_capture/win/screen_capturer_win_magnifier.h
+++ b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
@@ -22,7 +22,6 @@
 #include "modules/desktop_capture/screen_capturer_helper.h"
 #include "modules/desktop_capture/shared_desktop_frame.h"
 #include "modules/desktop_capture/win/scoped_thread_desktop.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -42,6 +41,10 @@
   ScreenCapturerWinMagnifier();
   ~ScreenCapturerWinMagnifier() override;
 
+  ScreenCapturerWinMagnifier(const ScreenCapturerWinMagnifier&) = delete;
+  ScreenCapturerWinMagnifier& operator=(const ScreenCapturerWinMagnifier&) =
+      delete;
+
   // Overridden from ScreenCapturer:
   void Start(Callback* callback) override;
   void SetSharedMemoryFactory(
@@ -130,8 +133,6 @@
   // True if the last OnMagImageScalingCallback was called and handled
   // successfully. Reset at the beginning of each CaptureImage call.
   bool magnifier_capture_succeeded_ = true;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/win/window_capture_utils.h b/modules/desktop_capture/win/window_capture_utils.h
index 335d8737..caea079 100644
--- a/modules/desktop_capture/win/window_capture_utils.h
+++ b/modules/desktop_capture/win/window_capture_utils.h
@@ -17,7 +17,6 @@
 
 #include "modules/desktop_capture/desktop_capturer.h"
 #include "modules/desktop_capture/desktop_geometry.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -104,6 +103,9 @@
   WindowCaptureHelperWin();
   ~WindowCaptureHelperWin();
 
+  WindowCaptureHelperWin(const WindowCaptureHelperWin&) = delete;
+  WindowCaptureHelperWin& operator=(const WindowCaptureHelperWin&) = delete;
+
   bool IsAeroEnabled();
   bool IsWindowChromeNotification(HWND hwnd);
   bool AreWindowsOverlapping(HWND hwnd,
@@ -127,8 +129,6 @@
 
   // Only used on Win10+.
   Microsoft::WRL::ComPtr<IVirtualDesktopManager> virtual_desktop_manager_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(WindowCaptureHelperWin);
 };
 
 }  // namespace webrtc
diff --git a/modules/desktop_capture/window_capturer_null.cc b/modules/desktop_capture/window_capturer_null.cc
index e7c7b0a..6da2a76 100644
--- a/modules/desktop_capture/window_capturer_null.cc
+++ b/modules/desktop_capture/window_capturer_null.cc
@@ -11,7 +11,6 @@
 #include "modules/desktop_capture/desktop_capturer.h"
 #include "modules/desktop_capture/desktop_frame.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -22,6 +21,9 @@
   WindowCapturerNull();
   ~WindowCapturerNull() override;
 
+  WindowCapturerNull(const WindowCapturerNull&) = delete;
+  WindowCapturerNull& operator=(const WindowCapturerNull&) = delete;
+
   // DesktopCapturer interface.
   void Start(Callback* callback) override;
   void CaptureFrame() override;
@@ -30,8 +32,6 @@
 
  private:
   Callback* callback_ = nullptr;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(WindowCapturerNull);
 };
 
 WindowCapturerNull::WindowCapturerNull() {}
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_logging.h b/modules/remote_bitrate_estimator/test/bwe_test_logging.h
index e855655..49e1e71 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_logging.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test_logging.h
@@ -128,7 +128,6 @@
 #include <stack>
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 
 #define BWE_TEST_LOGGING_GLOBAL_CONTEXT(name)                             \
@@ -341,6 +340,10 @@
 
   Logging();
   ~Logging();
+
+  Logging(const Logging&) = delete;
+  Logging& operator=(const Logging&) = delete;
+
   void PushState(const std::string& append_to_tag,
                  int64_t timestamp_ms,
                  bool enabled);
@@ -348,8 +351,6 @@
 
   Mutex mutex_;
   ThreadMap thread_map_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(Logging);
 };
 }  // namespace bwe
 }  // namespace testing
diff --git a/pc/srtp_filter.h b/pc/srtp_filter.h
index f1e1649..e2848a1 100644
--- a/pc/srtp_filter.h
+++ b/pc/srtp_filter.h
@@ -27,7 +27,6 @@
 #include "api/sequence_checker.h"
 #include "pc/session_description.h"
 #include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ssl_stream_adapter.h"
 
 // Forward declaration to avoid pulling in libsrtp headers here
diff --git a/rtc_base/openssl_certificate.h b/rtc_base/openssl_certificate.h
index c317a72..b2debbe 100644
--- a/rtc_base/openssl_certificate.h
+++ b/rtc_base/openssl_certificate.h
@@ -18,7 +18,6 @@
 #include <string>
 
 #include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ssl_certificate.h"
 #include "rtc_base/ssl_identity.h"
 
@@ -42,6 +41,9 @@
 
   ~OpenSSLCertificate() override;
 
+  OpenSSLCertificate(const OpenSSLCertificate&) = delete;
+  OpenSSLCertificate& operator=(const OpenSSLCertificate&) = delete;
+
   std::unique_ptr<SSLCertificate> Clone() const override;
 
   X509* x509() const { return x509_; }
@@ -70,7 +72,6 @@
 
  private:
   X509* x509_;  // NOT OWNED
-  RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate);
 };
 
 }  // namespace rtc
diff --git a/rtc_base/openssl_identity.h b/rtc_base/openssl_identity.h
index 00d6c74..63f46b3 100644
--- a/rtc_base/openssl_identity.h
+++ b/rtc_base/openssl_identity.h
@@ -17,7 +17,6 @@
 #include <memory>
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/openssl_certificate.h"
 #include "rtc_base/openssl_key_pair.h"
 #include "rtc_base/ssl_certificate.h"
@@ -43,6 +42,9 @@
       const std::string& certificate_chain);
   ~OpenSSLIdentity() override;
 
+  OpenSSLIdentity(const OpenSSLIdentity&) = delete;
+  OpenSSLIdentity& operator=(const OpenSSLIdentity&) = delete;
+
   const OpenSSLCertificate& certificate() const override;
   const SSLCertChain& cert_chain() const override;
 
@@ -66,8 +68,6 @@
 
   std::unique_ptr<OpenSSLKeyPair> key_pair_;
   std::unique_ptr<SSLCertChain> cert_chain_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLIdentity);
 };
 
 }  // namespace rtc
diff --git a/rtc_base/sigslottester.h.pump b/rtc_base/sigslottester.h.pump
index 0a1f411..c3d2d6e 100755
--- a/rtc_base/sigslottester.h.pump
+++ b/rtc_base/sigslottester.h.pump
@@ -35,7 +35,6 @@
 //   EXPECT_EQ("hello", capture);
 //   /* See unit-tests for more examples */
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/third_party/sigslot/sigslot.h"
 
 namespace rtc {
@@ -47,13 +46,14 @@
     signal->connect(this, &SigslotTester0::OnSignalCallback);
   }
 
+  SigslotTester0(const SigslotTester0&) = delete;
+  SigslotTester0& operator=(const SigslotTester0&) = delete;
+
   int callback_count() const { return callback_count_; }
 
  private:
   void OnSignalCallback() { callback_count_++; }
   int callback_count_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester0);
 };
 
 // Versions below are for testing signals that pass arguments. For all the
@@ -78,6 +78,9 @@
     signal->connect(this, &SigslotTester$i::OnSignalCallback);
   }
 
+  SigslotTester$i(const SigslotTester$i&) = delete;
+  SigslotTester$i& operator=(const SigslotTester$i&) = delete;
+
   int callback_count() const { return callback_count_; }
 
  private:
@@ -91,9 +94,6 @@
   int callback_count_;$for j [[
 
   C$j* capture$j[[]]_;]]
-
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SigslotTester$i);
 };
 
 ]]
diff --git a/rtc_base/task_queue_win.cc b/rtc_base/task_queue_win.cc
index 6382d6b..dd14a7d 100644
--- a/rtc_base/task_queue_win.cc
+++ b/rtc_base/task_queue_win.cc
@@ -34,7 +34,6 @@
 #include "api/task_queue/task_queue_base.h"
 #include "rtc_base/arraysize.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/event.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
@@ -122,6 +121,9 @@
     ::CloseHandle(event_);
   }
 
+  MultimediaTimer(const MultimediaTimer&) = delete;
+  MultimediaTimer& operator=(const MultimediaTimer&) = delete;
+
   bool StartOneShotTimer(UINT delay_ms) {
     RTC_DCHECK_EQ(0, timer_id_);
     RTC_DCHECK(event_ != nullptr);
@@ -148,8 +150,6 @@
  private:
   HANDLE event_ = nullptr;
   MMRESULT timer_id_ = 0;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(MultimediaTimer);
 };
 
 class TaskQueueWin : public TaskQueueBase {
diff --git a/rtc_base/win/windows_version.h b/rtc_base/win/windows_version.h
index dbb0d8e..3636eab 100644
--- a/rtc_base/win/windows_version.h
+++ b/rtc_base/win/windows_version.h
@@ -15,8 +15,6 @@
 
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
-
 typedef void* HANDLE;
 
 namespace rtc {
@@ -105,6 +103,9 @@
     WOW64_UNKNOWN,
   };
 
+  OSInfo(const OSInfo&) = delete;
+  OSInfo& operator=(const OSInfo&) = delete;
+
   static OSInfo* GetInstance();
 
   Version version() const { return version_; }
@@ -140,8 +141,6 @@
   size_t allocation_granularity_;
   WOW64Status wow64_status_;
   std::string processor_model_name_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(OSInfo);
 };
 
 // Because this is by far the most commonly-requested value from the above
diff --git a/rtc_tools/network_tester/config_reader.h b/rtc_tools/network_tester/config_reader.h
index f44e7a9..3735555 100644
--- a/rtc_tools/network_tester/config_reader.h
+++ b/rtc_tools/network_tester/config_reader.h
@@ -15,7 +15,6 @@
 #include <string>
 
 #include "absl/types/optional.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 
 #ifdef WEBRTC_NETWORK_TESTER_PROTO
@@ -39,12 +38,14 @@
   explicit ConfigReader(const std::string& config_file_path);
   ~ConfigReader();
 
+  ConfigReader(const ConfigReader&) = delete;
+  ConfigReader& operator=(const ConfigReader&) = delete;
+
   absl::optional<Config> GetNextConfig();
 
  private:
   NetworkTesterAllConfigs proto_all_configs_;
   int proto_config_index_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(ConfigReader);
 };
 
 }  // namespace webrtc
diff --git a/rtc_tools/network_tester/packet_logger.h b/rtc_tools/network_tester/packet_logger.h
index 109ee4c..c3ac309 100644
--- a/rtc_tools/network_tester/packet_logger.h
+++ b/rtc_tools/network_tester/packet_logger.h
@@ -14,7 +14,6 @@
 #include <fstream>
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 
 #ifdef WEBRTC_NETWORK_TESTER_PROTO
@@ -33,12 +32,13 @@
   explicit PacketLogger(const std::string& log_file_path);
   ~PacketLogger();
 
+  PacketLogger(const PacketLogger&) = delete;
+  PacketLogger& operator=(const PacketLogger&) = delete;
+
   void LogPacket(const NetworkTesterPacket& packet);
 
  private:
   std::ofstream packet_logger_stream_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PacketLogger);
 };
 
 }  // namespace webrtc
diff --git a/rtc_tools/network_tester/packet_sender.h b/rtc_tools/network_tester/packet_sender.h
index 7ccecdd..233ed6a 100644
--- a/rtc_tools/network_tester/packet_sender.h
+++ b/rtc_tools/network_tester/packet_sender.h
@@ -16,7 +16,6 @@
 
 #include "api/sequence_checker.h"
 #include "api/task_queue/task_queue_factory.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 #include "rtc_base/system/no_unique_address.h"
 #include "rtc_base/task_queue.h"
@@ -40,6 +39,9 @@
                const std::string& config_file_path);
   ~PacketSender();
 
+  PacketSender(const PacketSender&) = delete;
+  PacketSender& operator=(const PacketSender&) = delete;
+
   void StartSending();
   void StopSending();
   bool IsSending() const;
@@ -59,8 +61,6 @@
   TestController* const test_controller_;
   std::unique_ptr<TaskQueueFactory> task_queue_factory_;
   rtc::TaskQueue worker_queue_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PacketSender);
 };
 
 }  // namespace webrtc
diff --git a/rtc_tools/network_tester/test_controller.h b/rtc_tools/network_tester/test_controller.h
index 50055fc..3933b46 100644
--- a/rtc_tools/network_tester/test_controller.h
+++ b/rtc_tools/network_tester/test_controller.h
@@ -22,7 +22,6 @@
 #include "api/sequence_checker.h"
 #include "p2p/base/basic_packet_socket_factory.h"
 #include "rtc_base/async_packet_socket.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 #include "rtc_base/socket_address.h"
 #include "rtc_base/synchronization/mutex.h"
@@ -51,6 +50,9 @@
                  const std::string& config_file_path,
                  const std::string& log_file_path);
 
+  TestController(const TestController&) = delete;
+  TestController& operator=(const TestController&) = delete;
+
   void Run();
 
   void SendConnectTo(const std::string& hostname, int port);
@@ -80,8 +82,6 @@
   std::unique_ptr<rtc::AsyncPacketSocket> udp_socket_;
   rtc::SocketAddress remote_address_;
   std::unique_ptr<PacketSender> packet_sender_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(TestController);
 };
 
 }  // namespace webrtc
diff --git a/rtc_tools/rtc_event_log_visualizer/alerts.h b/rtc_tools/rtc_event_log_visualizer/alerts.h
index d3e4166..72f1241 100644
--- a/rtc_tools/rtc_event_log_visualizer/alerts.h
+++ b/rtc_tools/rtc_event_log_visualizer/alerts.h
@@ -19,7 +19,6 @@
 
 #include "absl/strings/string_view.h"
 #include "logging/rtc_event_log/rtc_event_log_parser.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
 
 namespace webrtc {
@@ -49,6 +48,9 @@
  public:
   explicit TriageHelper(const AnalyzerConfig& config) : config_(config) {}
 
+  TriageHelper(const TriageHelper&) = delete;
+  TriageHelper& operator=(const TriageHelper&) = delete;
+
   void AnalyzeLog(const ParsedRtcEventLog& parsed_log);
 
   void AnalyzeStreamGaps(const ParsedRtcEventLog& parsed_log,
@@ -80,7 +82,6 @@
       it->second.count += 1;
     }
   }
-  RTC_DISALLOW_COPY_AND_ASSIGN(TriageHelper);
 };
 
 }  // namespace webrtc
diff --git a/rtc_tools/sanitizers_unittest.cc b/rtc_tools/sanitizers_unittest.cc
index ee57583..6404eb2 100644
--- a/rtc_tools/sanitizers_unittest.cc
+++ b/rtc_tools/sanitizers_unittest.cc
@@ -15,7 +15,6 @@
 #include <random>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/null_socket_server.h"
 #include "rtc_base/thread.h"
 #include "test/gtest.h"
@@ -88,6 +87,9 @@
   explicit IncrementThread(int* value)
       : Thread(std::make_unique<NullSocketServer>()), value_(value) {}
 
+  IncrementThread(const IncrementThread&) = delete;
+  IncrementThread& operator=(const IncrementThread&) = delete;
+
   void Run() override {
     ++*value_;
     Thread::Current()->SleepMs(100);
@@ -98,8 +100,6 @@
 
  private:
   int* value_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(IncrementThread);
 };
 
 void DataRace() {
diff --git a/sdk/android/native_api/jni/java_types.h b/sdk/android/native_api/jni/java_types.h
index 8a13e3e..1008737 100644
--- a/sdk/android/native_api/jni/java_types.h
+++ b/sdk/android/native_api/jni/java_types.h
@@ -57,6 +57,9 @@
 
   ~Iterable();
 
+  Iterable(const Iterable&) = delete;
+  Iterable& operator=(const Iterable&) = delete;
+
   class Iterator {
    public:
     // Creates an iterator representing the end of any collection.
@@ -71,6 +74,9 @@
 
     ~Iterator();
 
+    Iterator(const Iterator&) = delete;
+    Iterator& operator=(const Iterator&) = delete;
+
     // Move assignment should not be used.
     Iterator& operator=(Iterator&&) = delete;
 
@@ -96,8 +102,6 @@
     ScopedJavaLocalRef<jobject> iterator_;
     ScopedJavaLocalRef<jobject> value_;
     SequenceChecker thread_checker_;
-
-    RTC_DISALLOW_COPY_AND_ASSIGN(Iterator);
   };
 
   Iterable::Iterator begin() { return Iterable::Iterator(jni_, iterable_); }
@@ -106,8 +110,6 @@
  private:
   JNIEnv* jni_;
   ScopedJavaLocalRef<jobject> iterable_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(Iterable);
 };
 
 // Returns true if `obj` == null in Java.
diff --git a/sdk/android/native_api/jni/scoped_java_ref.h b/sdk/android/native_api/jni/scoped_java_ref.h
index 634d35a..a2be447 100644
--- a/sdk/android/native_api/jni/scoped_java_ref.h
+++ b/sdk/android/native_api/jni/scoped_java_ref.h
@@ -15,9 +15,9 @@
 #define SDK_ANDROID_NATIVE_API_JNI_SCOPED_JAVA_REF_H_
 
 #include <jni.h>
+
 #include <utility>
 
-#include "rtc_base/constructor_magic.h"
 #include "sdk/android/native_api/jni/jvm.h"
 
 namespace webrtc {
@@ -34,6 +34,9 @@
 template <>
 class JavaRef<jobject> {
  public:
+  JavaRef(const JavaRef&) = delete;
+  JavaRef& operator=(const JavaRef&) = delete;
+
   jobject obj() const { return obj_; }
   bool is_null() const {
     // This is not valid for weak references. For weak references you need to
@@ -49,22 +52,19 @@
   constexpr JavaRef() : obj_(nullptr) {}
   explicit JavaRef(jobject obj) : obj_(obj) {}
   jobject obj_;
-
- private:
-  RTC_DISALLOW_COPY_AND_ASSIGN(JavaRef);
 };
 
 template <typename T>
 class JavaRef : public JavaRef<jobject> {
  public:
+  JavaRef(const JavaRef&) = delete;
+  JavaRef& operator=(const JavaRef&) = delete;
+
   T obj() const { return static_cast<T>(obj_); }
 
  protected:
   JavaRef() : JavaRef<jobject>(nullptr) {}
   explicit JavaRef(T obj) : JavaRef<jobject>(obj) {}
-
- private:
-  RTC_DISALLOW_COPY_AND_ASSIGN(JavaRef);
 };
 
 // Holds a local reference to a JNI method parameter.
@@ -79,8 +79,8 @@
   explicit JavaParamRef(T obj) : JavaRef<T>(obj) {}
   JavaParamRef(JNIEnv*, T obj) : JavaRef<T>(obj) {}
 
- private:
-  RTC_DISALLOW_COPY_AND_ASSIGN(JavaParamRef);
+  JavaParamRef(const JavaParamRef&) = delete;
+  JavaParamRef& operator=(const JavaParamRef&) = delete;
 };
 
 // Holds a local reference to a Java object. The local reference is scoped
@@ -186,6 +186,9 @@
       AttachCurrentThreadIfNeeded()->DeleteGlobalRef(obj_);
   }
 
+  ScopedJavaGlobalRef(const ScopedJavaGlobalRef&) = delete;
+  ScopedJavaGlobalRef& operator=(const ScopedJavaGlobalRef&) = delete;
+
   void operator=(const JavaRef<T>& other) {
     JNIEnv* env = AttachCurrentThreadIfNeeded();
     if (obj_ != nullptr) {
@@ -209,9 +212,6 @@
     obj_ = nullptr;
     return obj;
   }
-
- private:
-  RTC_DISALLOW_COPY_AND_ASSIGN(ScopedJavaGlobalRef);
 };
 
 template <typename T>
diff --git a/test/direct_transport.h b/test/direct_transport.h
index d6b70b9..d67f9ea 100644
--- a/test/direct_transport.h
+++ b/test/direct_transport.h
@@ -31,10 +31,13 @@
  public:
   explicit Demuxer(const std::map<uint8_t, MediaType>& payload_type_map);
   ~Demuxer() = default;
+
+  Demuxer(const Demuxer&) = delete;
+  Demuxer& operator=(const Demuxer&) = delete;
+
   MediaType GetMediaType(const uint8_t* packet_data,
                          size_t packet_length) const;
   const std::map<uint8_t, MediaType> payload_type_map_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(Demuxer);
 };
 
 // Objects of this class are expected to be allocated and destroyed  on the
diff --git a/test/mac/video_renderer_mac.h b/test/mac/video_renderer_mac.h
index 956f50b..8e629b0 100644
--- a/test/mac/video_renderer_mac.h
+++ b/test/mac/video_renderer_mac.h
@@ -11,7 +11,6 @@
 #ifndef TEST_MAC_VIDEO_RENDERER_MAC_H_
 #define TEST_MAC_VIDEO_RENDERER_MAC_H_
 
-#include "rtc_base/constructor_magic.h"
 #include "test/gl/gl_renderer.h"
 
 @class CocoaWindow;
@@ -24,6 +23,9 @@
   MacRenderer();
   virtual ~MacRenderer();
 
+  MacRenderer(const MacRenderer&) = delete;
+  MacRenderer& operator=(const MacRenderer&) = delete;
+
   bool Init(const char* window_title, int width, int height);
 
   // Implements GlRenderer.
@@ -31,8 +33,6 @@
 
  private:
   CocoaWindow* window_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(MacRenderer);
 };
 }  // namespace test
 }  // namespace webrtc
diff --git a/test/network/network_emulation.h b/test/network/network_emulation.h
index d10e9a8..61dc468 100644
--- a/test/network/network_emulation.h
+++ b/test/network/network_emulation.h
@@ -26,7 +26,6 @@
 #include "api/test/network_emulation_manager.h"
 #include "api/test/simulated_network.h"
 #include "api/units/timestamp.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/copy_on_write_buffer.h"
 #include "rtc_base/network.h"
 #include "rtc_base/network_constants.h"
@@ -467,7 +466,9 @@
       rtc::TaskQueue* task_queue,
       std::unique_ptr<NetworkBehaviorInterface> network_behavior);
   ~EmulatedNetworkNode() override;
-  RTC_DISALLOW_COPY_AND_ASSIGN(EmulatedNetworkNode);
+
+  EmulatedNetworkNode(const EmulatedNetworkNode&) = delete;
+  EmulatedNetworkNode& operator=(const EmulatedNetworkNode&) = delete;
 
   void OnPacketReceived(EmulatedIpPacket packet) override;
 
diff --git a/test/rtp_file_reader.cc b/test/rtp_file_reader.cc
index b3d0742..15a0513 100644
--- a/test/rtp_file_reader.cc
+++ b/test/rtp_file_reader.cc
@@ -18,7 +18,6 @@
 
 #include "modules/rtp_rtcp/source/rtp_util.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/format_macros.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/system/arch.h"
@@ -118,6 +117,9 @@
     }
   }
 
+  RtpDumpReader(const RtpDumpReader&) = delete;
+  RtpDumpReader& operator=(const RtpDumpReader&) = delete;
+
   bool Init(FILE* file, const std::set<uint32_t>& ssrc_filter) override {
     file_ = file;
 
@@ -187,8 +189,6 @@
 
  private:
   FILE* file_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpReader);
 };
 
 enum {
@@ -253,6 +253,9 @@
     }
   }
 
+  PcapReader(const PcapReader&) = delete;
+  PcapReader& operator=(const PcapReader&) = delete;
+
   bool Init(FILE* file, const std::set<uint32_t>& ssrc_filter) override {
     return Initialize(file, ssrc_filter) == kResultSuccess;
   }
@@ -619,8 +622,6 @@
   SsrcMap packets_by_ssrc_;
   std::vector<RtpPacketMarker> packets_;
   PacketIterator next_packet_it_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PcapReader);
 };
 
 RtpFileReaderImpl* CreateReaderForFormat(RtpFileReader::FileFormat format) {
diff --git a/test/rtp_file_writer.cc b/test/rtp_file_writer.cc
index cdd9c93..c80b638 100644
--- a/test/rtp_file_writer.cc
+++ b/test/rtp_file_writer.cc
@@ -16,7 +16,6 @@
 #include <string>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 namespace test {
@@ -39,6 +38,9 @@
     }
   }
 
+  RtpDumpWriter(const RtpDumpWriter&) = delete;
+  RtpDumpWriter& operator=(const RtpDumpWriter&) = delete;
+
   bool WritePacket(const RtpPacket* packet) override {
     uint16_t len = static_cast<uint16_t>(packet->length + kPacketHeaderSize);
     uint16_t plen = static_cast<uint16_t>(packet->original_length);
@@ -86,8 +88,6 @@
   }
 
   FILE* file_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpWriter);
 };
 
 RtpFileWriter* RtpFileWriter::Create(FileFormat format,
diff --git a/test/scenario/audio_stream.h b/test/scenario/audio_stream.h
index b561cb4..2110c1d 100644
--- a/test/scenario/audio_stream.h
+++ b/test/scenario/audio_stream.h
@@ -13,7 +13,6 @@
 #include <string>
 #include <vector>
 
-#include "rtc_base/constructor_magic.h"
 #include "test/scenario/call_client.h"
 #include "test/scenario/column_printer.h"
 #include "test/scenario/network_node.h"
@@ -26,8 +25,11 @@
 // stream if neccessary.
 class SendAudioStream {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(SendAudioStream);
   ~SendAudioStream();
+
+  SendAudioStream(const SendAudioStream&) = delete;
+  SendAudioStream& operator=(const SendAudioStream&) = delete;
+
   void Start();
   void Stop();
   void SetMuted(bool mute);
@@ -50,8 +52,11 @@
 // ReceiveAudioStream represents an audio receiver. It can't be used directly.
 class ReceiveAudioStream {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(ReceiveAudioStream);
   ~ReceiveAudioStream();
+
+  ReceiveAudioStream(const ReceiveAudioStream&) = delete;
+  ReceiveAudioStream& operator=(const ReceiveAudioStream&) = delete;
+
   void Start();
   void Stop();
   AudioReceiveStream::Stats GetStats() const;
@@ -74,8 +79,11 @@
 // the Scenario class.
 class AudioStreamPair {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(AudioStreamPair);
   ~AudioStreamPair();
+
+  AudioStreamPair(const AudioStreamPair&) = delete;
+  AudioStreamPair& operator=(const AudioStreamPair&) = delete;
+
   SendAudioStream* send() { return &send_stream_; }
   ReceiveAudioStream* receive() { return &receive_stream_; }
 
diff --git a/test/scenario/call_client.h b/test/scenario/call_client.h
index 08b0131..4898440 100644
--- a/test/scenario/call_client.h
+++ b/test/scenario/call_client.h
@@ -22,7 +22,6 @@
 #include "call/call.h"
 #include "modules/audio_device/include/test_audio_device.h"
 #include "modules/congestion_controller/goog_cc/test/goog_cc_printer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/task_queue_for_test.h"
 #include "test/logging/log_writer.h"
 #include "test/network/network_emulation.h"
@@ -68,8 +67,14 @@
  public:
   LoggingNetworkControllerFactory(LogWriterFactoryInterface* log_writer_factory,
                                   TransportControllerConfig config);
-  RTC_DISALLOW_COPY_AND_ASSIGN(LoggingNetworkControllerFactory);
+
   ~LoggingNetworkControllerFactory();
+
+  LoggingNetworkControllerFactory(const LoggingNetworkControllerFactory&) =
+      delete;
+  LoggingNetworkControllerFactory& operator=(
+      const LoggingNetworkControllerFactory&) = delete;
+
   std::unique_ptr<NetworkControllerInterface> Create(
       NetworkControllerConfig config) override;
   TimeDelta GetProcessInterval() const override;
@@ -99,9 +104,12 @@
   CallClient(TimeController* time_controller,
              std::unique_ptr<LogWriterFactoryInterface> log_writer_factory,
              CallClientConfig config);
-  RTC_DISALLOW_COPY_AND_ASSIGN(CallClient);
 
   ~CallClient();
+
+  CallClient(const CallClient&) = delete;
+  CallClient& operator=(const CallClient&) = delete;
+
   ColumnPrinter StatsPrinter();
   Call::Stats GetStats();
   DataRate send_bandwidth() {
@@ -165,8 +173,11 @@
 
 class CallClientPair {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(CallClientPair);
   ~CallClientPair();
+
+  CallClientPair(const CallClientPair&) = delete;
+  CallClientPair& operator=(const CallClientPair&) = delete;
+
   CallClient* first() { return first_; }
   CallClient* second() { return second_; }
   std::pair<CallClient*, CallClient*> forward() { return {first(), second()}; }
diff --git a/test/scenario/column_printer.h b/test/scenario/column_printer.h
index 4ace50d..529f459 100644
--- a/test/scenario/column_printer.h
+++ b/test/scenario/column_printer.h
@@ -14,7 +14,6 @@
 #include <string>
 #include <vector>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/strings/string_builder.h"
 #include "test/logging/log_writer.h"
 
@@ -46,8 +45,12 @@
  public:
   StatesPrinter(std::unique_ptr<RtcEventLogOutput> writer,
                 std::vector<ColumnPrinter> printers);
-  RTC_DISALLOW_COPY_AND_ASSIGN(StatesPrinter);
+
   ~StatesPrinter();
+
+  StatesPrinter(const StatesPrinter&) = delete;
+  StatesPrinter& operator=(const StatesPrinter&) = delete;
+
   void PrintHeaders();
   void PrintRow();
 
diff --git a/test/scenario/network_node.h b/test/scenario/network_node.h
index ea8eb35..156cdbb 100644
--- a/test/scenario/network_node.h
+++ b/test/scenario/network_node.h
@@ -20,7 +20,6 @@
 #include "api/units/timestamp.h"
 #include "call/call.h"
 #include "call/simulated_network.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/copy_on_write_buffer.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/task_queue.h"
diff --git a/test/scenario/scenario.h b/test/scenario/scenario.h
index 134cf08..5d82a60 100644
--- a/test/scenario/scenario.h
+++ b/test/scenario/scenario.h
@@ -15,7 +15,6 @@
 #include <vector>
 
 #include "api/test/time_controller.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/fake_clock.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/task_utils/repeating_task.h"
@@ -47,8 +46,12 @@
   Scenario(std::string file_name, bool real_time);
   Scenario(std::unique_ptr<LogWriterFactoryInterface> log_writer_manager,
            bool real_time);
-  RTC_DISALLOW_COPY_AND_ASSIGN(Scenario);
+
   ~Scenario();
+
+  Scenario(const Scenario&) = delete;
+  Scenario& operator=(const Scenario&) = delete;
+
   NetworkEmulationManagerImpl* net() { return &network_manager_; }
 
   EmulatedNetworkNode* CreateSimulationNode(NetworkSimulationConfig config);
diff --git a/test/scenario/video_stream.h b/test/scenario/video_stream.h
index 96b6d49..1451f59 100644
--- a/test/scenario/video_stream.h
+++ b/test/scenario/video_stream.h
@@ -13,7 +13,6 @@
 #include <string>
 #include <vector>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "test/fake_encoder.h"
 #include "test/fake_videorenderer.h"
@@ -32,8 +31,11 @@
 // states at run time.
 class SendVideoStream {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(SendVideoStream);
   ~SendVideoStream();
+
+  SendVideoStream(const SendVideoStream&) = delete;
+  SendVideoStream& operator=(const SendVideoStream&) = delete;
+
   void SetCaptureFramerate(int framerate);
   VideoSendStream::Stats GetStats() const;
   ColumnPrinter StatsPrinter();
@@ -72,8 +74,11 @@
 // ReceiveVideoStream represents a video receiver. It can't be used directly.
 class ReceiveVideoStream {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(ReceiveVideoStream);
   ~ReceiveVideoStream();
+
+  ReceiveVideoStream(const ReceiveVideoStream&) = delete;
+  ReceiveVideoStream& operator=(const ReceiveVideoStream&) = delete;
+
   void Start();
   void Stop();
   VideoReceiveStream::Stats GetStats() const;
@@ -103,8 +108,11 @@
 // the Scenario class.
 class VideoStreamPair {
  public:
-  RTC_DISALLOW_COPY_AND_ASSIGN(VideoStreamPair);
   ~VideoStreamPair();
+
+  VideoStreamPair(const VideoStreamPair&) = delete;
+  VideoStreamPair& operator=(const VideoStreamPair&) = delete;
+
   SendVideoStream* send() { return &send_stream_; }
   ReceiveVideoStream* receive() { return &receive_stream_; }
   VideoFrameMatcher* matcher() { return &matcher_; }
diff --git a/video/adaptation/overuse_frame_detector.h b/video/adaptation/overuse_frame_detector.h
index 2b4dd61..caefda1 100644
--- a/video/adaptation/overuse_frame_detector.h
+++ b/video/adaptation/overuse_frame_detector.h
@@ -18,7 +18,6 @@
 #include "api/sequence_checker.h"
 #include "api/task_queue/task_queue_base.h"
 #include "api/video/video_stream_encoder_observer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/numerics/exp_filter.h"
 #include "rtc_base/system/no_unique_address.h"
@@ -68,6 +67,9 @@
   explicit OveruseFrameDetector(CpuOveruseMetricsObserver* metrics_observer);
   virtual ~OveruseFrameDetector();
 
+  OveruseFrameDetector(const OveruseFrameDetector&) = delete;
+  OveruseFrameDetector& operator=(const OveruseFrameDetector&) = delete;
+
   // Start to periodically check for overuse.
   void StartCheckForOveruse(
       TaskQueueBase* task_queue_base,
@@ -161,8 +163,6 @@
 
   // If set by field trial, overrides CpuOveruseOptions::filter_time_ms.
   FieldTrialOptional<TimeDelta> filter_time_constant_{"tau"};
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(OveruseFrameDetector);
 };
 
 }  // namespace webrtc
diff --git a/video/call_stats.h b/video/call_stats.h
index 0c8e267..d198223 100644
--- a/video/call_stats.h
+++ b/video/call_stats.h
@@ -18,7 +18,6 @@
 #include "modules/include/module.h"
 #include "modules/include/module_common_types.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "system_wrappers/include/clock.h"
 
@@ -35,6 +34,9 @@
   CallStats(Clock* clock, ProcessThread* process_thread);
   ~CallStats() override;
 
+  CallStats(const CallStats&) = delete;
+  CallStats& operator=(const CallStats&) = delete;
+
   // Registers/deregisters a new observer to receive statistics updates.
   // Must be called from the construction thread.
   void RegisterStatsObserver(CallStatsObserver* observer);
@@ -114,8 +116,6 @@
   SequenceChecker process_thread_checker_;
   ProcessThread* const process_thread_;
   bool process_thread_running_ RTC_GUARDED_BY(construction_thread_checker_);
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(CallStats);
 };
 
 }  // namespace webrtc
diff --git a/video/call_stats2.h b/video/call_stats2.h
index 74bd348..b626e48 100644
--- a/video/call_stats2.h
+++ b/video/call_stats2.h
@@ -17,7 +17,6 @@
 #include "api/units/timestamp.h"
 #include "modules/include/module_common_types.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/task_utils/pending_task_safety_flag.h"
 #include "rtc_base/task_utils/repeating_task.h"
@@ -35,6 +34,9 @@
   CallStats(Clock* clock, TaskQueueBase* task_queue);
   ~CallStats();
 
+  CallStats(const CallStats&) = delete;
+  CallStats& operator=(const CallStats&) = delete;
+
   // Ensure that necessary repeating tasks are started.
   void EnsureStarted();
 
@@ -125,8 +127,6 @@
 
   // Used to signal destruction to potentially pending tasks.
   ScopedTaskSafety task_safety_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(CallStats);
 };
 
 }  // namespace internal
diff --git a/video/rtp_video_stream_receiver.h b/video/rtp_video_stream_receiver.h
index 2df76b3..abd4452 100644
--- a/video/rtp_video_stream_receiver.h
+++ b/video/rtp_video_stream_receiver.h
@@ -46,7 +46,6 @@
 #include "modules/video_coding/packet_buffer.h"
 #include "modules/video_coding/rtp_frame_reference_finder.h"
 #include "modules/video_coding/unique_timestamp_counter.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/numerics/sequence_number_util.h"
 #include "rtc_base/synchronization/mutex.h"
diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h
index a361b49..48aab34 100644
--- a/video/rtp_video_stream_receiver2.h
+++ b/video/rtp_video_stream_receiver2.h
@@ -43,7 +43,6 @@
 #include "modules/video_coding/packet_buffer.h"
 #include "modules/video_coding/rtp_frame_reference_finder.h"
 #include "modules/video_coding/unique_timestamp_counter.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/numerics/sequence_number_util.h"
 #include "rtc_base/system/no_unique_address.h"
diff --git a/video/stats_counter.h b/video/stats_counter.h
index 9c3f6f8..9e2b870 100644
--- a/video/stats_counter.h
+++ b/video/stats_counter.h
@@ -14,8 +14,6 @@
 #include <memory>
 #include <string>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 class AggregatedCounter;
@@ -156,6 +154,9 @@
              bool include_empty_intervals);
   ~AvgCounter() override {}
 
+  AvgCounter(const AvgCounter&) = delete;
+  AvgCounter& operator=(const AvgCounter&) = delete;
+
   void Add(int sample);
 
  private:
@@ -163,8 +164,6 @@
 
   // Returns the last computed metric (i.e. from GetMetric).
   int GetValueForEmptyInterval() const override;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(AvgCounter);
 };
 
 // MaxCounter: maximum of samples
@@ -180,13 +179,14 @@
              int64_t process_intervals_ms);
   ~MaxCounter() override {}
 
+  MaxCounter(const MaxCounter&) = delete;
+  MaxCounter& operator=(const MaxCounter&) = delete;
+
   void Add(int sample);
 
  private:
   bool GetMetric(int* metric) const override;
   int GetValueForEmptyInterval() const override;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(MaxCounter);
 };
 
 // PercentCounter: percentage of samples
@@ -200,13 +200,14 @@
   PercentCounter(Clock* clock, StatsCounterObserver* observer);
   ~PercentCounter() override {}
 
+  PercentCounter(const PercentCounter&) = delete;
+  PercentCounter& operator=(const PercentCounter&) = delete;
+
   void Add(bool sample);
 
  private:
   bool GetMetric(int* metric) const override;
   int GetValueForEmptyInterval() const override;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PercentCounter);
 };
 
 // PermilleCounter: permille of samples
@@ -220,13 +221,14 @@
   PermilleCounter(Clock* clock, StatsCounterObserver* observer);
   ~PermilleCounter() override {}
 
+  PermilleCounter(const PermilleCounter&) = delete;
+  PermilleCounter& operator=(const PermilleCounter&) = delete;
+
   void Add(bool sample);
 
  private:
   bool GetMetric(int* metric) const override;
   int GetValueForEmptyInterval() const override;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(PermilleCounter);
 };
 
 // RateCounter: units per second
@@ -247,13 +249,14 @@
               bool include_empty_intervals);
   ~RateCounter() override {}
 
+  RateCounter(const RateCounter&) = delete;
+  RateCounter& operator=(const RateCounter&) = delete;
+
   void Add(int sample);
 
  private:
   bool GetMetric(int* metric) const override;
   int GetValueForEmptyInterval() const override;  // Returns zero.
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(RateCounter);
 };
 
 // RateAccCounter: units per second (used for counters)
@@ -274,6 +277,9 @@
                  bool include_empty_intervals);
   ~RateAccCounter() override {}
 
+  RateAccCounter(const RateAccCounter&) = delete;
+  RateAccCounter& operator=(const RateAccCounter&) = delete;
+
   void Set(int64_t sample, uint32_t stream_id);
 
   // Sets the value for previous interval.
@@ -283,8 +289,6 @@
  private:
   bool GetMetric(int* metric) const override;
   int GetValueForEmptyInterval() const override;  // Returns zero.
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(RateAccCounter);
 };
 
 }  // namespace webrtc
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index 9a313e1..147e011 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -36,7 +36,6 @@
 #include "modules/video_coding/svc/svc_rate_allocator.h"
 #include "rtc_base/arraysize.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/event.h"
 #include "rtc_base/experiments/alr_experiment.h"
 #include "rtc_base/experiments/encoder_info_settings.h"
diff --git a/video/video_stream_encoder.h b/video/video_stream_encoder.h
index 30c04b2..c667f04 100644
--- a/video/video_stream_encoder.h
+++ b/video/video_stream_encoder.h
@@ -82,6 +82,9 @@
       BitrateAllocationCallbackType allocation_cb_type);
   ~VideoStreamEncoder() override;
 
+  VideoStreamEncoder(const VideoStreamEncoder&) = delete;
+  VideoStreamEncoder& operator=(const VideoStreamEncoder&) = delete;
+
   void AddAdaptationResource(rtc::scoped_refptr<Resource> resource) override;
   std::vector<rtc::scoped_refptr<Resource>> GetAdaptationResources() override;
 
@@ -440,8 +443,6 @@
 
   // Used to cancel any potentially pending tasks to the worker thread.
   ScopedTaskSafety task_safety_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(VideoStreamEncoder);
 };
 
 }  // namespace webrtc