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

Unified Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc

Issue 1966893003: IDL changes for BLE GATT server support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
index f5402742c51a25319eaefd0b0add905ec646514e..4b20720e6dcccdfd78ebdc3e221268544a7704b3 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
@@ -186,7 +186,7 @@ device::BluetoothGattCharacteristic::Properties GetBluetoothProperties(
device::BluetoothGattCharacteristic::PROPERTY_NONE;
static_assert(
- apibtle::CHARACTERISTIC_PROPERTY_LAST == 10,
+ apibtle::CHARACTERISTIC_PROPERTY_LAST == 14,
"Update required if the number of characteristic properties changes.");
if (HasProperty(api_properties, apibtle::CHARACTERISTIC_PROPERTY_BROADCAST))
@@ -1284,8 +1284,7 @@ void BluetoothLowEnergyRegisterServiceFunction::DoWork() {
}
void BluetoothLowEnergyRegisterServiceFunction::SuccessCallback() {
- Respond(ArgumentList(apibtle::RegisterService::Results::Create(
- apibtle::SERVICE_RESULT_SUCCESS)));
+ Respond(NoArguments());
}
void BluetoothLowEnergyRegisterServiceFunction::ErrorCallback(
@@ -1308,8 +1307,7 @@ void BluetoothLowEnergyUnregisterServiceFunction::DoWork() {
}
void BluetoothLowEnergyUnregisterServiceFunction::SuccessCallback() {
- Respond(ArgumentList(apibtle::UnregisterService::Results::Create(
- apibtle::SERVICE_RESULT_SUCCESS)));
+ Respond(NoArguments());
}
void BluetoothLowEnergyUnregisterServiceFunction::ErrorCallback(
@@ -1317,6 +1315,23 @@ void BluetoothLowEnergyUnregisterServiceFunction::ErrorCallback(
Respond(Error(StatusToString(status)));
}
+// notifyCharacteristicValueChanged:
+
+template class BLEPeripheralExtensionFunction<
+ apibtle::NotifyCharacteristicValueChanged::Params>;
+
+void BluetoothLowEnergyNotifyCharacteristicValueChangedFunction::DoWork() {
+ Respond(Error(kErrorPermissionDenied));
+}
+
+// removeService:
+
+template class BLEPeripheralExtensionFunction<apibtle::RemoveService::Params>;
+
+void BluetoothLowEnergyRemoveServiceFunction::DoWork() {
+ Respond(Error(kErrorPermissionDenied));
+}
+
// sendRequestResponse:
template class BLEPeripheralExtensionFunction<

Powered by Google App Engine
This is Rietveld 408576698