Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h

Issue 1096393002: API stubs for the BLE advertisement API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698