Index: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
index 834cca3fdf38d199e235a83d249d968400cc16e3..debb635c92b0f5dd77816cf1ad4411de1d5cd2e9 100644 |
--- a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
+++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h |
@@ -329,6 +329,50 @@ class BluetoothLowEnergyWriteDescriptorValueFunction |
std::string instance_id_; |
}; |
+class BluetoothLowEnergyRegisterAdvertisementFunction |
+ : public BluetoothLowEnergyExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.registerAdvertisement", |
+ BLUETOOTHLOWENERGY_REGISTERADVERTISEMENT); |
+ |
+ protected: |
+ ~BluetoothLowEnergyRegisterAdvertisementFunction() override {} |
+ |
+ // BluetoothLowEnergyExtensionFunction override. |
+ bool DoWork() override; |
+ |
+ private: |
+ // Success and error callbacks, called by |
+ // BluetoothLowEnergyEventRouter::WriteDescriptorValue. |
+ void SuccessCallback(); |
+ void ErrorCallback(BluetoothLowEnergyEventRouter::Status status); |
+ |
+ // The instance ID of the requested descriptor. |
+ std::string instance_id_; |
+}; |
+ |
+class BluetoothLowEnergyUnregisterAdvertisementFunction |
+ : public BluetoothLowEnergyExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.unregisterAdvertisement", |
+ BLUETOOTHLOWENERGY_UNREGISTERADVERTISEMENT); |
+ |
+ protected: |
+ ~BluetoothLowEnergyUnregisterAdvertisementFunction() override {} |
+ |
+ // BluetoothLowEnergyExtensionFunction override. |
+ bool DoWork() override; |
+ |
+ private: |
+ // Success and error callbacks, called by |
+ // BluetoothLowEnergyEventRouter::WriteDescriptorValue. |
+ void SuccessCallback(); |
+ void ErrorCallback(BluetoothLowEnergyEventRouter::Status status); |
+ |
+ // The instance ID of the requested descriptor. |
+ std::string instance_id_; |
+}; |
+ |
} // namespace core_api |
} // namespace extensions |