    ]
  
    deps = [
-     "//base",
-     "//ui/gfx",
+@@ -22,6 +23,8 @@ jumbo_source_set("latency") {
+   public_deps = [
+     "//services/metrics/public/cpp:metrics_cpp",
    ]
 +
 +  defines = [ "UI_LATENCY_IMPLEMENTATION" ]
  }
  
- source_set("test_support") {
+ jumbo_source_set("test_support") {
 diff --git a/ui/latency/latency_info.h b/ui/latency/latency_info.h
-index 0f8b6be29ff6..a36bb10e43a3 100644
+index d9d390861562..7b1aa99e8a9c 100644
 --- a/ui/latency/latency_info.h
 +++ b/ui/latency/latency_info.h
-@@ -15,6 +15,7 @@
- #include "base/containers/flat_map.h"
+@@ -16,6 +16,7 @@
  #include "base/time/time.h"
+ #include "services/metrics/public/cpp/ukm_source_id.h"
  #include "ui/gfx/geometry/point_f.h"
 +#include "ui/latency/ui_latency_export.h"
  

   struct LatencyComponent {
     // Nondecreasing number that can be used to determine what events happened
diff --git a/ui/latency/latency_tracker.h b/ui/latency/latency_tracker.h
index 0fae6d317702..23717620ede1 100644
--- a/ui/latency/latency_tracker.h
+++ b/ui/latency/latency_tracker.h
@@ -7,12 +7,13 @@
 
 #include "base/macros.h"
 #include "ui/latency/latency_info.h"
+#include "ui/latency/ui_latency_export.h"
 

-class LatencyTracker {
+class UI_LATENCY_EXPORT LatencyTracker {
  public:
   explicit LatencyTracker(bool metric_sampling,
                           ukm::SourceId ukm_source_id = ukm::kInvalidSourceId);
diff --git a/ui/latency/ui_latency_export.h b/ui/latency/ui_latency_export.h
new file mode 100644
index 0000000..f24ee91
