blob: 64a041908ea540683fd6b0f0a118f17d9fc91e3b [file] [log] [blame]
Sebastian Janssonecb68972019-01-18 10:30:54 +01001# Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../webrtc.gni")
10
Mirko Bonadei86d053c2019-10-17 21:32:04 +020011rtc_library("repeating_task") {
Sebastian Janssonecb68972019-01-18 10:30:54 +010012 sources = [
13 "repeating_task.cc",
14 "repeating_task.h",
15 ]
16 deps = [
Danil Chapovalov0f9a8e32021-06-11 18:39:17 +020017 ":pending_task_safety_flag",
Danil Chapovalov4423c362019-03-06 18:41:39 +010018 ":to_queued_task",
Sebastian Janssonecb68972019-01-18 10:30:54 +010019 "..:logging",
Sebastian Janssonecb68972019-01-18 10:30:54 +010020 "..:timeutils",
Artem Titovd15a5752021-02-10 14:31:24 +010021 "../../api:sequence_checker",
Danil Chapovalov4423c362019-03-06 18:41:39 +010022 "../../api/task_queue",
Sebastian Janssonecb68972019-01-18 10:30:54 +010023 "../../api/units:time_delta",
24 "../../api/units:timestamp",
Tommi532cac52020-05-18 14:53:42 +020025 "../../system_wrappers:system_wrappers",
Sebastian Janssonecb68972019-01-18 10:30:54 +010026 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020027 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Sebastian Janssonecb68972019-01-18 10:30:54 +010028}
29
Tommi3c9bcc12020-04-15 16:45:47 +020030rtc_library("pending_task_safety_flag") {
31 sources = [
32 "pending_task_safety_flag.cc",
33 "pending_task_safety_flag.h",
34 ]
35 deps = [
36 "..:checks",
Tommi86ee89f2021-04-20 16:58:01 +020037 "../../api:refcountedbase",
Tommi3c9bcc12020-04-15 16:45:47 +020038 "../../api:scoped_refptr",
Artem Titovd15a5752021-02-10 14:31:24 +010039 "../../api:sequence_checker",
Mirko Bonadei20e4c802020-11-23 11:07:42 +010040 "../system:no_unique_address",
Tommi3c9bcc12020-04-15 16:45:47 +020041 ]
42}
43
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010044rtc_source_set("to_queued_task") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010045 sources = [ "to_queued_task.h" ]
Tommi3c5450e2020-05-03 22:48:13 +020046 deps = [
47 ":pending_task_safety_flag",
48 "../../api/task_queue",
49 ]
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010050}
51
Sebastian Janssonecb68972019-01-18 10:30:54 +010052if (rtc_include_tests) {
Tommi3c9bcc12020-04-15 16:45:47 +020053 rtc_library("pending_task_safety_flag_unittests") {
54 testonly = true
55 sources = [ "pending_task_safety_flag_unittest.cc" ]
56 deps = [
57 ":pending_task_safety_flag",
58 ":to_queued_task",
59 "..:rtc_base_approved",
60 "..:rtc_task_queue",
61 "..:task_queue_for_test",
62 "../../test:test_support",
63 ]
64 }
65
Mirko Bonadei86d053c2019-10-17 21:32:04 +020066 rtc_library("repeating_task_unittests") {
Sebastian Janssonecb68972019-01-18 10:30:54 +010067 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010068 sources = [ "repeating_task_unittest.cc" ]
Sebastian Janssonecb68972019-01-18 10:30:54 +010069 deps = [
70 ":repeating_task",
71 "..:rtc_base_approved",
Danil Chapovalov4423c362019-03-06 18:41:39 +010072 "..:rtc_task_queue",
Danil Chapovalov07122bc2019-03-26 14:37:01 +010073 "..:task_queue_for_test",
Sebastian Janssonecb68972019-01-18 10:30:54 +010074 "../../test:test_support",
Sebastian Janssonecb68972019-01-18 10:30:54 +010075 ]
76 }
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010077
Mirko Bonadei86d053c2019-10-17 21:32:04 +020078 rtc_library("to_queued_task_unittests") {
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010079 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010080 sources = [ "to_queued_task_unittest.cc" ]
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010081 deps = [
82 ":to_queued_task",
83 "../../api/task_queue",
84 "../../test:test_support",
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010085 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020086 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Danil Chapovalov3b548dd2019-03-01 14:58:44 +010087 }
Sebastian Janssonecb68972019-01-18 10:30:54 +010088}