blob: f290fe3ab71e2dee337cd50575da574f426a5920 [file] [log] [blame]
Tom Anderson4ee83742022-07-14 20:58:411# Copyright 2022 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/linux/gtk/gtk.gni")
Tom Anderson4ee83742022-07-14 20:58:416import("//ui/qt/qt.gni")
7
Tom Anderson37fe6872022-07-20 18:22:028assert(is_linux)
9
Tom Anderson4ee83742022-07-14 20:58:4110component("linux_ui") {
11 defines = [ "IS_LINUX_UI_IMPL" ]
12 public = [
Tom Andersona49b45a2022-07-14 22:54:3013 "cursor_theme_manager_observer.h",
Tom Anderson4ee83742022-07-14 20:58:4114 "device_scale_factor_observer.h",
15 "linux_ui.h",
Tom Anderson9c557892022-07-19 17:26:4316 "linux_ui_delegate.h",
17 "linux_ui_delegate_stub.h",
Tom Anderson4ee83742022-07-14 20:58:4118 "nav_button_provider.h",
19 "status_icon_linux.h",
20 "window_button_order_observer.h",
21 "window_frame_provider.h",
22 ]
23 sources = [
24 "linux_ui.cc",
Tom Anderson9c557892022-07-19 17:26:4325 "linux_ui_delegate.cc",
26 "linux_ui_delegate_stub.cc",
Tom Anderson4ee83742022-07-14 20:58:4127 "status_icon_linux.cc",
28 ]
29 deps = [
Tom Andersone3f74fd2022-07-19 17:08:3030 "//base",
Tom Anderson4ee83742022-07-14 20:58:4131 "//build:chromecast_buildflags",
Tom Andersone3f74fd2022-07-19 17:08:3032 "//ui/gfx",
Tom Anderson9c557892022-07-19 17:26:4333 "//ui/gfx/animation",
Tom Anderson4ee83742022-07-14 20:58:4134 "//ui/native_theme",
Tom Anderson4ee83742022-07-14 20:58:4135 ]
Tom Anderson4ee83742022-07-14 20:58:4136 public_deps = [
37 "//printing/buildflags",
38 "//skia",
Tom Anderson4ee83742022-07-14 20:58:4139 ]
40}
41
42source_set("linux_ui_factory") {
43 sources = [
44 "linux_ui_factory.cc",
45 "linux_ui_factory.h",
46 ]
47
48 public_deps = [ ":linux_ui" ]
49
Tom Andersona49b45a2022-07-14 22:54:3050 deps = [
51 "//base",
52 "//ui/base:buildflags",
53 ]
Tom Anderson4ee83742022-07-14 20:58:4154 if (use_gtk) {
55 # This is the only component that can interact with gtk.
56 deps += [ "//ui/gtk" ]
57 }
58 if (use_qt) {
59 deps += [ "//ui/qt" ]
60 }
61}
Tom Anderson37fe6872022-07-20 18:22:0262
63source_set("test_support") {
64 testonly = true
65
66 public = [ "fake_linux_ui.h" ]
67 sources = [ "fake_linux_ui.cc" ]
68
69 public_deps = [ ":linux_ui" ]
70 deps = [
71 "//base",
72 "//skia",
73 "//ui/gfx",
74 "//ui/native_theme",
75 "//ui/shell_dialogs",
76 ]
77}