| # 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/jumbo.gni") |
| import("//build/config/ui.gni") |
| import("//testing/test.gni") |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } else if (is_mac) { |
| import("//build/config/mac/rules.gni") |
| } |
| jumbo_component("idle") { |
| output_name = "ui_base_idle" |
| defines = [ "IS_UI_BASE_IDLE_IMPL" ] |
| sources = [ |
| "idle.cc", |
| "idle.h", |
| "idle_android.cc", |
| "idle_chromeos.cc", |
| "idle_linux.cc", |
| "idle_mac.mm", |
| "idle_win.cc", |
| ] |
| |
| deps = [ |
| "//ui/base", |
| ] |
| public_deps = [] |
| libs = [] |
| |
| if (is_fuchsia) { |
| sources += [ "idle_fuchsia.cc" ] |
| } |
| |
| if (use_x11) { |
| public_deps += [ "//ui/base/x" ] |
| deps += [ "//ui/gfx/x" ] |
| configs += [ |
| "//build/config/linux:x11", |
| "//build/config/linux:xscrnsaver", |
| ] |
| sources += [ |
| "idle_query_x11.cc", |
| "idle_query_x11.h", |
| "screensaver_window_finder_x11.cc", |
| "screensaver_window_finder_x11.h", |
| ] |
| } |
| |
| if (is_chromeos) { |
| deps += [ |
| "//chromeos", |
| "//chromeos/dbus", |
| "//ui/base/user_activity", |
| ] |
| sources -= [ "idle_linux.cc" ] |
| } |
| |
| if (is_android) { |
| sources -= [ "idle.cc" ] |
| deps += [ "//ui/base:ui_base_jni_headers" ] |
| } |
| |
| if (is_mac) { |
| libs += [ |
| "Carbon.framework", |
| "Foundation.framework", |
| ] |
| } |
| } |