Index: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
index 48e8f1348089daea52bd36bc62404dbbad65d170..a807ea7fbac3977c0a7ae9d65411e36ece043a83 100644 |
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
@@ -74,6 +74,43 @@ class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction { |
DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyExtensionFunction); |
}; |
+class BluetoothLowEnergyConnectFunction |
+ : public BluetoothLowEnergyExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.connect", |
+ BLUETOOTHLOWENERGY_CONNECT); |
+ |
+ protected: |
+ virtual ~BluetoothLowEnergyConnectFunction() {} |
+ |
+ // BluetoothLowEnergyExtensionFunction override. |
+ virtual bool DoWork() OVERRIDE; |
+ |
+ private: |
+ // Success and error callbacks, called by |
+ // BluetoothLowEnergyEventRouter::Connect. |
+ void SuccessCallback(); |
+ void ErrorCallback(BluetoothLowEnergyEventRouter::Status status); |
+}; |
+ |
+class BluetoothLowEnergyDisconnectFunction |
+ : public BluetoothLowEnergyExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.disconnect", |
+ BLUETOOTHLOWENERGY_DISCONNECT); |
+ |
+ protected: |
+ virtual ~BluetoothLowEnergyDisconnectFunction() {} |
+ |
+ // BluetoothLowEnergyExtensionFunction override. |
+ virtual bool DoWork() OVERRIDE; |
+ |
+ private: |
+ // Callback called by BluetoothLowEnergyEventRouter::Disconnect when the |
+ // operation has completed. |
+ void SuccessCallback(); |
+}; |
+ |
class BluetoothLowEnergyGetServiceFunction |
: public BluetoothLowEnergyExtensionFunction { |
public: |