1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# 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_internal.cc",
"idle_internal.h",
]
if (is_chromeos) {
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) {
sources += [ "idle_linux.cc" ]
}
if (use_xscrnsaver) {
defines += [ "USE_XSCRNSAVER" ]
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",
]
}
|