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 b56d3bfd055301432f683cc5b4a21905300b4e4c..5e9c05ccac8d2136f9cb3ee67660cf8e675b3e6d 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 |
@@ -438,6 +438,7 @@ class BluetoothLowEnergyAdvertisementFunction |
int AddAdvertisement(BluetoothApiAdvertisement* advertisement); |
BluetoothApiAdvertisement* GetAdvertisement(int advertisement_id); |
void RemoveAdvertisement(int advertisement_id); |
+ const base::hash_set<int>* GetAdvertisementIds(); |
// ExtensionFunction override. |
bool RunAsync() override; |
@@ -485,6 +486,26 @@ class BluetoothLowEnergyUnregisterAdvertisementFunction |
device::BluetoothAdvertisement::ErrorCode status); |
}; |
+class BluetoothLowEnergyResetAllAdvertisementsFunction |
+ : public BluetoothLowEnergyAdvertisementFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.resetAllAdvertisements", |
+ BLUETOOTHLOWENERGY_RESETALLADVERTISEMENTS); |
+ |
+ protected: |
+ ~BluetoothLowEnergyResetAllAdvertisementsFunction() override {} |
+ |
+ // BluetoothLowEnergyExtensionFunctionDeprecated override. |
+ bool DoWork() override; |
+ |
+ private: |
+ void OnUnregister(int advertisement_id); |
+ void UnregisterSuccessCallback(int advertisement_id); |
+ void UnregisterErrorCallback( |
+ int advertisement_id, |
+ device::BluetoothAdvertisement::ErrorCode status); |
+}; |
+ |
class BluetoothLowEnergySetAdvertisingIntervalFunction |
: public BLEPeripheralExtensionFunction< |
extensions::api::bluetooth_low_energy::SetAdvertisingInterval:: |