Skip to content

Commit

Permalink
Add bluetooth pairing UI README.md documentation.
Browse files Browse the repository at this point in the history
Fixed: b/303135850
Test: None
Change-Id: I1081ec5a3f93f896533770bafc69089572fe4fb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4985365
Reviewed-by: Gordon Seto <gordonseto@google.com>
Reviewed-by: Theo Johnson-kanu <tjohnsonkanu@google.com>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216423}
  • Loading branch information
Regan Hsu authored and Chromium LUCI CQ committed Oct 27, 2023
1 parent ffff521 commit 1d5c97c
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions ash/webui/common/resources/bluetooth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# ChromeOS Bluetooth Pairing UI

This directory contains Bluetooth pairing UI polymer elements used to display
information about available Bluetooth devices that can be paired, and UI that
the user interacts with to pair with a Bluetooth device of their choosing.
The dialog is either shown within Settings UI, a standalone dialog in sign-in
screen and OOBE.

Underneath the hood, the elements use the [CrosBluetoothConfig mojo API](https://source.chromium.org/chromium/chromium/src/+/main:chromeos/ash/services/Bluetooth_config/public/mojom/cros_Bluetooth_config.mojom;l=1;bpv=1;bpt=0;drc=321047b607bc69f5d6dce6e47319d0c198d0616e)
to fetch metadata about available Bluetooth devices to pair with, and to
actually pair with Bluetooth devices.

## BluetoothBasePage
Base template with elements common to all Bluetooth UI sub-pages.

## BluetoothBatteryIconPercentage
View displaying a dynamically colored/sized battery icon and corresponding
battery percentage string for a given device and battery type.

## BluetoothDeviceBatteryInfo
View displaying Bluetooth device battery info. Decides whether to show multiple
battery icon percentages (if the Bluetooth device has multiple associated
batteries, like wireless earbuds for example) or a single battery icon
percentage (like a single Bluetooth speaker for example).

## BluetoothIcon
UI element used to display Bluetooth device icon. Decides whether to show
system Bluetooth icons depending on the type of device, or the default
device image if there is an available image url associated to the device.

## BluetoothMetricsUtils
Used by other components in this directory to record Bluetooth metrics.

## BlueoothPairingConfirmCodePage
Bluetooth page that displays UI elements for when authentication via
confirm passkey is required during Bluetooth device pairing.

## BluetoothPairingDeviceItem
Container used to display information about a single Bluetooth device.

## BluetoothPairingDeviceSelectionPage
Bluetooth page that displays a list of discovered Bluetooth devices
and initiate pairing to a device.

## BluetoothPairingEnterCodePage
Bluetooth page that displays UI elements for when authentication via
display passkey or PIN is required during Bluetooth device pairing.

## BluetoothPairingRequestCodePage
Bluetooth page that displays UI elements for when authentication via PIN
or PASSKEY is required during Bluetooth device pairing.

## BluetoothPairingUi
Root UI element for Bluetooth pairing dialog. Contains all the Bluetooth
pairing pages and decides which one to display.

## BluetoothSpinnerPage
Bluetooth page displayed when a pairing is in progress. Displays a
pinwheel.

## BluetoothTypes
Contains enums that are used to describe the type and state of the
Bluetooth device.

## BluetoothUtils
Contains utility functions to easily fetch metadata about a
Bluetooth device.

## CrosBluetoothConfig
Wrapper for CrosBluetoothConfig that provides the ability to inject
a fake CrosBluetoothConfig implementation for tests.

0 comments on commit 1d5c97c

Please sign in to comment.