Metronome: complete API migration.

This CL finalizes the Metronome refactor undertaken in
crbug.com/1381982 and enables it again in call.cc.

Fixed: chromium:1381982
Change-Id: I1642103e9c8a3f2a1f12d7635a1b27310802c1c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282920
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38605}
This commit is contained in:
Markus Handell
2022-11-10 10:53:27 +01:00
committed by WebRTC LUCI CQ
parent 123a0ed604
commit 15a82c93d0
6 changed files with 25 additions and 28 deletions

View File

@ -10,10 +10,7 @@ import("../../webrtc.gni")
rtc_source_set("metronome") {
visibility = [ "*" ]
sources = [
"metronome.cc",
"metronome.h",
]
sources = [ "metronome.h" ]
deps = [
"../../rtc_base/system:rtc_export",
"../task_queue",

View File

@ -30,22 +30,8 @@ namespace webrtc {
// Metronome implementations must be thread-compatible.
class RTC_EXPORT Metronome {
public:
// TODO(crbug.com/1381982): remove stale classes and methods once downstream
// dependencies adapts.
class RTC_EXPORT TickListener {
public:
virtual ~TickListener() = default;
virtual void OnTick() = 0;
virtual TaskQueueBase* OnTickTaskQueue() = 0;
};
virtual ~Metronome() = default;
// TODO(crbug.com/1381982): remove stale classes and methods once downstream
// dependencies adapts.
virtual void AddListener(TickListener* listener);
virtual void RemoveListener(TickListener* listener);
// Requests a call to `callback` on the next tick. Scheduled callbacks are
// executed on the same sequence as they were requested on. There are no
// features for cancellation. When that's needed, use e.g. ScopedTaskSafety