Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / bluetooth / bluetooth_api_pairing_delegate.h
blob61e151259a862587d637c69d5b086c28043da421
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
8 #include <string>
10 #include "device/bluetooth/bluetooth_device.h"
11 #include "extensions/common/api/bluetooth_private.h"
13 namespace content {
14 class BrowserContext;
17 namespace extensions {
19 // A pairing delegate to dispatch incoming Bluetooth pairing events to the API
20 // event router.
21 class BluetoothApiPairingDelegate
22 : public device::BluetoothDevice::PairingDelegate {
23 public:
24 BluetoothApiPairingDelegate(const std::string& extension_id,
25 content::BrowserContext* browser_context);
26 ~BluetoothApiPairingDelegate() override;
28 // device::PairingDelegate overrides:
29 void RequestPinCode(device::BluetoothDevice* device) override;
30 void RequestPasskey(device::BluetoothDevice* device) override;
31 void DisplayPinCode(device::BluetoothDevice* device,
32 const std::string& pincode) override;
33 void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override;
34 void KeysEntered(device::BluetoothDevice* device, uint32 entered) override;
35 void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override;
36 void AuthorizePairing(device::BluetoothDevice* device) override;
38 private:
39 // Dispatches a pairing event to the extension.
40 void DispatchPairingEvent(
41 const api::bluetooth_private::PairingEvent& pairing_event);
43 std::string extension_id_;
44 content::BrowserContext* browser_context_;
47 } // namespace extensions
49 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_