#include "content/browser/bluetooth/frame_connected_bluetooth_devices.h"
#include <optional>
#include "base/containers/contains.h"
#include "base/strings/string_util.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/web_contents.h"
#include "device/bluetooth/bluetooth_gatt_connection.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
namespace content {
struct GATTConnectionAndServerClient { … };
FrameConnectedBluetoothDevices::FrameConnectedBluetoothDevices(
RenderFrameHost& rfh)
: … { … }
FrameConnectedBluetoothDevices::~FrameConnectedBluetoothDevices() { … }
bool FrameConnectedBluetoothDevices::IsConnectedToDeviceWithId(
const blink::WebBluetoothDeviceId& device_id) { … }
void FrameConnectedBluetoothDevices::Insert(
const blink::WebBluetoothDeviceId& device_id,
std::unique_ptr<device::BluetoothGattConnection> connection,
mojo::AssociatedRemote<blink::mojom::WebBluetoothServerClient> client) { … }
void FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithId(
const blink::WebBluetoothDeviceId& device_id) { … }
std::optional<blink::WebBluetoothDeviceId>
FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithAddress(
const std::string& device_address) { … }
void FrameConnectedBluetoothDevices::CloseConnectionsToDevicesNotInList(
const std::set<blink::WebBluetoothDeviceId>& permitted_ids) { … }
void FrameConnectedBluetoothDevices::IncrementDevicesConnectedCount() { … }
void FrameConnectedBluetoothDevices::DecrementDevicesConnectedCount() { … }
}