mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Cleanup include and dependencies in api/metronome
In particular remove unused dependency on rtc::TaskQueue Bug: webrtc:14169 Change-Id: Iaddf661bb0abcefb7d69608ab4f0dfe431732c9a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334900 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41562}
This commit is contained in:
parent
0b6899272c
commit
7d637a9788
6 changed files with 6 additions and 33 deletions
7
api/DEPS
7
api/DEPS
|
@ -159,13 +159,6 @@ specific_include_rules = {
|
|||
"+modules/audio_processing/include/audio_processing.h",
|
||||
],
|
||||
|
||||
"fake_metronome\.h": [
|
||||
"+rtc_base/synchronization/mutex.h",
|
||||
"+rtc_base/task_queue.h",
|
||||
"+rtc_base/task_utils/repeating_task.h",
|
||||
"+rtc_base/thread_annotations.h",
|
||||
],
|
||||
|
||||
"make_ref_counted\.h": [
|
||||
"+rtc_base/ref_counted_object.h",
|
||||
],
|
||||
|
|
|
@ -13,7 +13,7 @@ rtc_source_set("metronome") {
|
|||
sources = [ "metronome.h" ]
|
||||
deps = [
|
||||
"../../rtc_base/system:rtc_export",
|
||||
"../task_queue",
|
||||
"../units:time_delta",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/functional:any_invocable" ]
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifndef API_METRONOME_METRONOME_H_
|
||||
#define API_METRONOME_METRONOME_H_
|
||||
|
||||
#include "api/task_queue/task_queue_base.h"
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
|
|
|
@ -16,15 +16,8 @@ rtc_library("fake_metronome") {
|
|||
]
|
||||
deps = [
|
||||
"..:metronome",
|
||||
"../..:priority",
|
||||
"../..:sequence_checker",
|
||||
"../../../rtc_base:macromagic",
|
||||
"../../../rtc_base:rtc_event",
|
||||
"../../../rtc_base:rtc_task_queue",
|
||||
"../../../rtc_base/synchronization:mutex",
|
||||
"../../../rtc_base/task_utils:repeating_task",
|
||||
"../../../test:test_support",
|
||||
"../../task_queue",
|
||||
"../../units:time_delta",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/functional:any_invocable" ]
|
||||
}
|
||||
|
|
|
@ -13,13 +13,9 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "api/priority.h"
|
||||
#include "api/sequence_checker.h"
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "api/task_queue/task_queue_base.h"
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/task_utils/repeating_task.h"
|
||||
|
||||
namespace webrtc::test {
|
||||
|
||||
|
|
|
@ -11,18 +11,12 @@
|
|||
#ifndef API_METRONOME_TEST_FAKE_METRONOME_H_
|
||||
#define API_METRONOME_TEST_FAKE_METRONOME_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "api/metronome/metronome.h"
|
||||
#include "api/task_queue/task_queue_base.h"
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/task_queue.h"
|
||||
#include "rtc_base/task_utils/repeating_task.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
namespace webrtc::test {
|
||||
|
||||
|
@ -48,9 +42,6 @@ class ForcedTickMetronome : public Metronome {
|
|||
// FakeMetronome is a metronome that ticks based on a repeating task at the
|
||||
// `tick_period` provided in the constructor. It is designed for use with
|
||||
// simulated task queues for unit tests.
|
||||
//
|
||||
// `Stop()` must be called before destruction, as it cancels the metronome tick
|
||||
// on the proper task queue.
|
||||
class FakeMetronome : public Metronome {
|
||||
public:
|
||||
explicit FakeMetronome(TimeDelta tick_period);
|
||||
|
|
Loading…
Reference in a new issue