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

Unified Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h

Issue 297003004: chrome.bluetoothLowEnergy: Implement readDescriptorValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 6 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_event_router.h
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
index 6dbe6987527d368a96aedd1da62ffb0c66da299e..86631aae8b0c56da1f2ac73c9697e190408cb0d1 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
@@ -140,6 +140,14 @@ class BluetoothLowEnergyEventRouter
const base::Closure& callback,
const base::Closure& error_callback);
+ // Sends a request to read the value of the descriptor with instance ID
+ // |instance_id|. Returns false, if no such descriptor is known. Otherwise,
+ // returns true and invokes |callback| on success, and |error_callback| on
+ // failure.
+ bool ReadDescriptorValue(const std::string& instance_id,
+ const base::Closure& callback,
+ const base::Closure& error_callback);
+
// Initializes the adapter for testing. Used by unit tests only.
void SetAdapterForTesting(device::BluetoothAdapter* adapter);
@@ -204,8 +212,8 @@ class BluetoothLowEnergyEventRouter
device::BluetoothGattDescriptor* FindDescriptorById(
const std::string& instance_id) const;
- // Called by BluetoothGattCharacteristic in response to
- // ReadRemoteCharacteristic.
+ // Called by BluetoothGattCharacteristic and BluetoothGattDescriptor in
+ // response to ReadRemoteCharacteristic and ReadRemoteDescriptor.
void ValueCallback(const base::Closure& callback,
const std::vector<uint8>& value);

Powered by Google App Engine
This is Rietveld 408576698