| Index: extensions/browser/api/bluetooth/bluetooth_private_api.h
|
| diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.h b/extensions/browser/api/bluetooth/bluetooth_private_api.h
|
| index 6e3af7204d853796af8b3eb28bbd81413ef0888e..887d18ae21c2b330511e933762d99aa3ebbf5d59 100644
|
| --- a/extensions/browser/api/bluetooth/bluetooth_private_api.h
|
| +++ b/extensions/browser/api/bluetooth/bluetooth_private_api.h
|
| @@ -6,6 +6,7 @@
|
| #define EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_
|
|
|
| #include "base/callback_forward.h"
|
| +#include "base/macros.h"
|
| #include "device/bluetooth/bluetooth_device.h"
|
| #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h"
|
| #include "extensions/browser/browser_context_keyed_api_factory.h"
|
| @@ -128,6 +129,24 @@ class BluetoothPrivateSetDiscoveryFilterFunction
|
| void OnErrorCallback();
|
| };
|
|
|
| +class BluetoothPrivateConnectFunction : public BluetoothExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.connect",
|
| + BLUETOOTHPRIVATE_CONNECT)
|
| + BluetoothPrivateConnectFunction();
|
| +
|
| + // BluetoothExtensionFunction:
|
| + bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
|
| +
|
| + private:
|
| + ~BluetoothPrivateConnectFunction() override;
|
| +
|
| + void OnSuccessCallback();
|
| + void OnErrorCallback(device::BluetoothDevice::ConnectErrorCode error);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateConnectFunction);
|
| +};
|
| +
|
| class BluetoothPrivatePairFunction : public BluetoothExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.pair", BLUETOOTHPRIVATE_PAIR)
|
|
|