Index: ui/gfx/BUILD.gn |
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn |
index 5ee5e1a2e6e4e05377468cef3f4c8a3135e00c7e..68dc928406235a1ba85cd9952501e0b03ea053b1 100644 |
--- a/ui/gfx/BUILD.gn |
+++ b/ui/gfx/BUILD.gn |
@@ -155,8 +155,6 @@ component("gfx") { |
"scoped_ui_graphics_push_context_ios.mm", |
"scrollbar_size.cc", |
"scrollbar_size.h", |
- "selection_bound.cc", |
- "selection_bound.h", |
"selection_model.cc", |
"selection_model.h", |
"sequential_id_generator.cc", |
@@ -239,6 +237,7 @@ component("gfx") { |
public_deps = [ |
":memory_buffer_sources", |
":native_widget_types", |
+ ":selection_bound_sources", |
"//base", |
"//skia", |
"//third_party/icu", |
@@ -584,6 +583,36 @@ source_set("native_widget_types") { |
] |
} |
+group("selection_bound") { |
+ if (is_component_build) { |
+ public_deps = [ |
+ ":gfx", |
+ ] |
+ } else { |
+ public_deps = [ |
+ ":selection_bound_sources", |
+ ] |
+ } |
+} |
+ |
+# Depend on this to use selection_bound.h without pulling in all of gfx. |
+source_set("selection_bound_sources") { |
+ visibility = [ ":*" ] |
+ |
+ sources = [ |
+ "gfx_export.h", |
+ "selection_bound.cc", |
+ "selection_bound.h", |
+ ] |
+ |
+ defines = [ "GFX_IMPLEMENTATION" ] |
+ |
+ public_deps = [ |
+ "//base", |
+ "//ui/gfx/geometry", |
+ ] |
+} |
+ |
# The GPU memory buffer stuff is separate from "gfx" to allow GPU-related |
# things to use these files without pulling in all of gfx, which includes large |
# things like Skia. |