blob: 530d02ade7882afe0fadac172234c3b963e43292 [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/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) {
deps += [ "//chromeos/dbus/session_manager" ]
}
sources = [
"idle.cc",
"idle.h",
"idle_chromeos.cc",
"idle_internal.cc",
"idle_internal.h",
"idle_mac.mm",
"idle_win.cc",
]
if (is_fuchsia) {
sources += [ "idle_fuchsia.cc" ]
}
if (is_linux && !is_chromeos) {
sources += [ "idle_linux.cc" ]
}
if (use_x11 && !is_chromeos) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xscrnsaver",
]
deps += [ "//ui/gfx/x" ]
sources += [
"idle_query_x11.cc",
"idle_query_x11.h",
"screensaver_window_finder_x11.cc",
"screensaver_window_finder_x11.h",
]
}
if (is_android) {
deps += [ "//ui/base:ui_base_jni_headers" ]
sources -= [ "idle.cc" ]
sources += [ "idle_android.cc" ]
}
if (is_mac) {
libs = [
"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",
]
}