1# Copyright (c) 2014 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 11rtc_source_set("utility") { 12 sources = [ 13 "maybe_worker_thread.cc", 14 "maybe_worker_thread.h", 15 ] 16 17 deps = [ 18 "../../api:field_trials_view", 19 "../../api:sequence_checker", 20 "../../api/task_queue", 21 "../../api/task_queue:pending_task_safety_flag", 22 "../../rtc_base:checks", 23 "../../rtc_base:logging", 24 "../../rtc_base:macromagic", 25 "../../rtc_base:rtc_event", 26 "../../rtc_base:rtc_task_queue", 27 ] 28 29 absl_deps = [ 30 "//third_party/abseil-cpp/absl/functional:any_invocable", 31 "//third_party/abseil-cpp/absl/strings:strings", 32 ] 33 34 if (is_android) { 35 visibility = [ "*" ] 36 sources += [ 37 "include/helpers_android.h", 38 "include/jvm_android.h", 39 "source/helpers_android.cc", 40 "source/jvm_android.cc", 41 ] 42 43 deps += [ 44 "../../api:sequence_checker", 45 "../../rtc_base:checks", 46 "../../rtc_base:logging", 47 "../../rtc_base:platform_thread", 48 "../../rtc_base/system:arch", 49 ] 50 } 51} 52 53if (rtc_include_tests) { 54 rtc_library("utility_unittests") { 55 testonly = true 56 57 sources = [ "maybe_worker_thread_unittests.cc" ] 58 deps = [ 59 ":utility", 60 "../../api:sequence_checker", 61 "../../api/task_queue", 62 "../../api/task_queue:default_task_queue_factory", 63 "../../api/task_queue:pending_task_safety_flag", 64 "../../api/units:time_delta", 65 "../../rtc_base:rtc_event", 66 "../../rtc_base:threading", 67 "../../test:explicit_key_value_config", 68 "../../test:field_trial", 69 "../../test:test_main", 70 "../../test:test_support", 71 "../../test/time_controller", 72 ] 73 } 74} 75