#ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
#define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
#include <string>
#include "chrome/common/extensions/api/bluetooth_private.h"
#include "device/bluetooth/bluetooth_device.h"
namespace content {
class BrowserContext;
}
namespace extensions {
class BluetoothApiPairingDelegate
: public device::BluetoothDevice::PairingDelegate {
public:
BluetoothApiPairingDelegate(const std::string& extension_id,
content::BrowserContext* browser_context);
virtual ~BluetoothApiPairingDelegate();
virtual void RequestPinCode(device::BluetoothDevice* device) OVERRIDE;
virtual void RequestPasskey(device::BluetoothDevice* device) OVERRIDE;
virtual void DisplayPinCode(device::BluetoothDevice* device,
const std::string& pincode) OVERRIDE;
virtual void DisplayPasskey(device::BluetoothDevice* device,
uint32 passkey) OVERRIDE;
virtual void KeysEntered(device::BluetoothDevice* device,
uint32 entered) OVERRIDE;
virtual void ConfirmPasskey(device::BluetoothDevice* device,
uint32 passkey) OVERRIDE;
virtual void AuthorizePairing(device::BluetoothDevice* device) OVERRIDE;
private:
void DispatchPairingEvent(
const api::bluetooth_private::PairingEvent& pairing_event);
std::string extension_id_;
content::BrowserContext* browser_context_;
};
}
#endif