#include "extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.h"
#include <memory>
#include <utility>
#include "base/values.h"
#include "content/public/browser/browser_context.h"
#include "device/bluetooth/bluetooth_device.h"
#include "extensions/browser/api/bluetooth/bluetooth_api_utils.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/api/bluetooth_private.h"
namespace extensions {
bt_private;
namespace {
void PopulatePairingEvent(const device::BluetoothDevice* device,
bt_private::PairingEventType type,
bt_private::PairingEvent* out) { … }
}
BluetoothApiPairingDelegate::BluetoothApiPairingDelegate(
content::BrowserContext* browser_context)
: … { … }
BluetoothApiPairingDelegate::~BluetoothApiPairingDelegate() = default;
void BluetoothApiPairingDelegate::RequestPinCode(
device::BluetoothDevice* device) { … }
void BluetoothApiPairingDelegate::RequestPasskey(
device::BluetoothDevice* device) { … }
void BluetoothApiPairingDelegate::DisplayPinCode(
device::BluetoothDevice* device,
const std::string& pincode) { … }
void BluetoothApiPairingDelegate::DisplayPasskey(
device::BluetoothDevice* device,
uint32_t passkey) { … }
void BluetoothApiPairingDelegate::KeysEntered(device::BluetoothDevice* device,
uint32_t entered) { … }
void BluetoothApiPairingDelegate::ConfirmPasskey(
device::BluetoothDevice* device,
uint32_t passkey) { … }
void BluetoothApiPairingDelegate::AuthorizePairing(
device::BluetoothDevice* device) { … }
void BluetoothApiPairingDelegate::DispatchPairingEvent(
const bt_private::PairingEvent& pairing_event) { … }
}