Enable Enterprise enrollment on desktop builds.
[chromium-blink-merge.git] / chrome / browser / extensions / api / bluetooth / bluetooth_api_pairing_delegate.h
blob95791b3b558bd0cc9687fd804e53bfb762888120
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 CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_
8 #include <string>
10 #include "chrome/common/extensions/api/bluetooth_private.h"
11 #include "device/bluetooth/bluetooth_device.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 virtual ~BluetoothApiPairingDelegate();
28 // device::PairingDelegate overrides:
29 virtual void RequestPinCode(device::BluetoothDevice* device) OVERRIDE;
30 virtual void RequestPasskey(device::BluetoothDevice* device) OVERRIDE;
31 virtual void DisplayPinCode(device::BluetoothDevice* device,
32 const std::string& pincode) OVERRIDE;
33 virtual void DisplayPasskey(device::BluetoothDevice* device,
34 uint32 passkey) OVERRIDE;
35 virtual void KeysEntered(device::BluetoothDevice* device,
36 uint32 entered) OVERRIDE;
37 virtual void ConfirmPasskey(device::BluetoothDevice* device,
38 uint32 passkey) OVERRIDE;
39 virtual void AuthorizePairing(device::BluetoothDevice* device) OVERRIDE;
41 private:
42 // Dispatches a pairing event to the extension.
43 void DispatchPairingEvent(
44 const api::bluetooth_private::PairingEvent& pairing_event);
46 std::string extension_id_;
47 content::BrowserContext* browser_context_;
50 } // namespace extensions
52 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_PAIRING_DELEGATE_H_