Modularize chrome/browser/ui/hid

This CL adds to chrome/browser/ui/hid its own BUILD.gn file, so it has
its own GN targets, cleaning chrome/browser/ui/BUILD.gn and better
defining dependencies across modules.

[email protected]

Bug: 370804668
Change-Id: I791feb7ac5f41baf988d4441bf81c0a52654c634
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5905058
Reviewed-by: Erik Chen <[email protected]>
Commit-Queue: Antonio Gomes <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1363417}
diff --git a/chrome/browser/ui/hid/BUILD.gn b/chrome/browser/ui/hid/BUILD.gn
new file mode 100644
index 0000000..f23e339
--- /dev/null
+++ b/chrome/browser/ui/hid/BUILD.gn
@@ -0,0 +1,53 @@
+# Copyright 2024 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+assert(is_win || is_mac || is_linux || is_chromeos)
+
+source_set("hid") {
+  sources = [
+    "hid_chooser.h",
+    "hid_chooser_controller.h",
+  ]
+  public_deps = [
+    "//base",
+    "//chrome/browser/hid",
+    "//components/permissions",
+    "//content/public/browser",
+    "//services/device/public/mojom",
+    "//third_party/blink/public/common",
+    "//url",
+  ]
+}
+
+source_set("impl") {
+  sources = [
+    "hid_chooser.cc",
+    "hid_chooser_controller.cc",
+  ]
+  deps = [
+    ":hid",
+    "//chrome/app:generated_resources",
+    "//chrome/browser/profiles:profile",
+    "//chrome/common",
+    "//components/strings:components_strings",
+    "//services/device/public/cpp/hid",
+    "//ui/base",
+  ]
+  public_deps = [ "//chrome/browser:browser_public_dependencies" ]
+}
+
+source_set("unit_tests") {
+  testonly = true
+  sources = [ "hid_chooser_controller_unittest.cc" ]
+  deps = [
+    ":hid",
+    "//base/test:test_support",
+    "//chrome/app:generated_resources",
+    "//chrome/test:test_support",
+    "//components/permissions:test_support",
+    "//content/test:test_support",
+    "//services/device/public/cpp:test_support",
+    "//services/device/public/cpp/hid",
+  ]
+}