1 # Copyright 2014 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.
5 assert(is_linux, "This file should only be referenced on Linux")
7 import("//build/config/features.gni")
8 import("//build/config/ui.gni")
10 component("libgtk2ui") {
12 "app_indicator_icon.cc",
13 "app_indicator_icon.h",
14 "app_indicator_icon_menu.cc",
15 "app_indicator_icon_menu.h",
16 "chrome_gtk_frame.cc",
18 "chrome_gtk_menu_subclasses.cc",
19 "chrome_gtk_menu_subclasses.h",
20 "g_object_destructor_filo.cc",
21 "g_object_destructor_filo.h",
26 "gtk2_key_bindings_handler.cc",
27 "gtk2_key_bindings_handler.h",
28 "gtk2_signal_registrar.cc",
29 "gtk2_signal_registrar.h",
30 "gtk2_status_icon.cc",
39 "native_theme_gtk2.cc",
40 "native_theme_gtk2.h",
41 "owned_widget_gtk2.cc",
42 "owned_widget_gtk2.h",
43 "print_dialog_gtk2.cc",
44 "print_dialog_gtk2.h",
45 "printing_gtk2_util.cc",
46 "printing_gtk2_util.h",
47 "select_file_dialog_impl.cc",
48 "select_file_dialog_impl.h",
49 "select_file_dialog_impl_gtk2.cc",
50 "select_file_dialog_impl_kde.cc",
55 "x11_input_method_context_impl_gtk2.cc",
56 "x11_input_method_context_impl_gtk2.h",
64 configs += [ "//build/config/linux:gconf" ]
66 defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
69 configs += [ "//printing:cups" ]
72 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz.
73 # To avoid missing indirectly referenced harfbuzz symbols from pango,
74 # some hack is required when bundled harfbuzz is used and component build is
76 # See crbug.com/462689 for details.
77 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ]
79 # gn orders flags on a target before flags from configs. The default config
80 # adds -Wall, and these flags have to be after -Wall -- so they need to come
81 # from a config and can't be on the target directly.
82 config("libgtk2ui_warnings") {
85 # G_DEFINE_TYPE automatically generates a *get_instance_private inline
86 # function after glib 2.37. That's unused. Prevent to complain about it.
87 "-Wno-unused-function",
89 # G_STATIC_ASSERT uses a typedef as a static_assert.
90 "-Wno-unused-local-typedef",
95 ":libgtk2ui_warnings",
96 "//build/config/linux:x11",
101 "//base/third_party/dynamic_annotations",
103 "//chrome/app/theme:theme_resources",
104 "//chrome:extra_resources",
105 "//chrome:resources",
107 "//components/resources",
108 "//content/public/browser",
109 "//mojo/environment:chromium",
112 "//third_party/mojo/src/mojo/edk/system",
117 "//ui/events:events_base",
122 "//ui/shell_dialogs",
129 "//build/config/linux/gtk3",
130 "//build/config/linux/gtk3:gtkprint3",
134 "//build/config/linux/gtk2",
135 "//build/config/linux/gtk2:gtkprint2",