blob: 2f472b5c58122e393c0dc642195a3ebd0a0d654b [file] [log] [blame]
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/ui.gni")
if (is_mac) {
import("//build/config/mac/rules.gni")
}
component("idle") {
output_name = "ui_base_idle"
defines = [ "IS_UI_BASE_IDLE_IMPL" ]
# All targets in this file are allowed to access any of the headers.
friend = [ ":*" ]
public = [ "idle.h" ]
deps = [
"//base",
"//ui/base",
]
if (is_chromeos_ash) {
deps += [ "//chromeos/dbus/session_manager" ]
}
sources = [
"idle.cc",
"idle.h",
"idle_internal.cc",
"idle_internal.h",
]
if (is_chromeos_ash) {
sources += [ "idle_chromeos.cc" ]
}
if (is_mac) {
sources += [ "idle_mac.mm" ]
}
if (is_win) {
sources += [ "idle_win.cc" ]
}
if (is_fuchsia) {
sources += [ "idle_fuchsia.cc" ]
}
if (is_linux || is_chromeos_lacros) {
sources += [ "idle_linux.cc" ]
}
if (use_x11 && !is_chromeos_ash) {
deps += [ "//ui/base/x" ]
}
if (use_ozone) {
deps += [
"//ui/base:features",
"//ui/display",
]
}
if (is_android) {
deps += [ "//ui/base:ui_base_jni_headers" ]
sources -= [ "idle.cc" ]
sources += [ "idle_android.cc" ]
}
if (is_mac) {
frameworks = [
"AppKit.framework",
"Carbon.framework",
"Foundation.framework",
]
}
}
static_library("test_support") {
testonly = true
sources = [
"scoped_set_idle_state.cc",
"scoped_set_idle_state.h",
]
deps = [
":idle",
"//base",
]
}