Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: ui/views/BUILD.gn

Issue 2913933002: Move views::Label DisabledColor logic into views::LabelButtonLabel (Closed)
Patch Set: OK.. I think I found a solution Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/button/label_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/BUILD.gn
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 80cdae18bfa651b749538015a445e428422bb21f..b514011d74cb91a584d5f0612497605a1b982c32 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -31,6 +31,7 @@ aggregate_vector_icons("views_vector_icons") {
}
component("views") {
+ allow_circular_includes_from = [ ":views_internal" ]
all_dependent_configs = [ ":flags" ]
sources = [
"accessibility/native_view_accessibility.h",
@@ -412,6 +413,7 @@ component("views") {
defines = [ "VIEWS_IMPLEMENTATION" ]
deps = [
+ ":views_internal",
":views_vector_icons",
"//base:i18n",
"//base/third_party/dynamic_annotations",
@@ -667,6 +669,39 @@ component("views") {
}
}
+static_library("views_internal") {
sky 2017/06/08 19:06:14 This seems overly complex, but I could certainly b
+ # External code should depend upon "views".
+ visibility = [ "./*" ]
+
+ sources = [
+ "controls/button/label_button_label.cc",
+ "controls/button/label_button_label.h",
+ ]
+
+ defines = [ "VIEWS_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ "//skia:skia",
+ "//ui/accessibility:ax_gen",
+ "//ui/gfx",
+ ]
+}
+
+# Lists headers in :views_internal that are used in :views_unittests. This is
+# needed to satisfy gn check because :views_unittests can't depend on both
+# :views and :views_internal without linking in :views_internal twice and
+# causing duplicate symbols. This happens because when :views is a DLL and
+# :views_internal is a static library, the usual symbol resolution breaks.
+source_set("test_headers") {
+ visibility = [ "./*" ]
+ check_includes = false # Deps are checked in :views_internal.
+
+ sources = [
+ "controls/button/label_button_label.h",
brettw 2017/06/13 22:33:57 What's the ever higher level goal here? You want v
tapted 2017/06/14 09:14:09 Yup - exactly.
+ ]
+}
tapted 2017/06/08 04:11:32 You can see the other things I attempted in earlie
+
static_library("test_support_internal") {
testonly = true
sources = [
@@ -857,6 +892,7 @@ source_set("views_unittests_sources") {
"controls/button/custom_button_unittest.cc",
"controls/button/image_button_factory_unittest.cc",
"controls/button/image_button_unittest.cc",
+ "controls/button/label_button_label_unittest.cc",
"controls/button/label_button_unittest.cc",
"controls/button/menu_button_unittest.cc",
"controls/button/toggle_button_unittest.cc",
@@ -915,7 +951,9 @@ source_set("views_unittests_sources") {
# Make all deps in this target public so both views_unittests and
# views_mus_unittests will get them.
public_deps = [
+ ":test_headers",
":test_support",
+ ":views",
tapted 2017/06/08 04:11:32 One problem with the approach used by ":test_suppo
"//base",
"//base:i18n",
"//base/test:test_support",
« no previous file with comments | « no previous file | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698