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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_private_api.h

Issue 819713002: bluetoothPrivate: Add disconnectAll function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment by jyasskin@ Created 5 years, 11 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: extensions/browser/api/bluetooth/bluetooth_private_api.h
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.h b/extensions/browser/api/bluetooth/bluetooth_private_api.h
index 68c4a991cfec2d4192f15705736ecd57b52998d2..e36f737ab41b7f47e47bd3c2f0808769edc2d4ce 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_api.h
+++ b/extensions/browser/api/bluetooth/bluetooth_private_api.h
@@ -90,6 +90,26 @@ class BluetoothPrivateSetPairingResponseFunction
DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateSetPairingResponseFunction);
};
+class BluetoothPrivateDisconnectAllFunction
+ : public BluetoothExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.disconnectAll",
+ BLUETOOTHPRIVATE_DISCONNECTALL);
+ BluetoothPrivateDisconnectAllFunction();
+
+ // BluetoothExtensionFunction overrides:
+ bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
+
+ private:
+ ~BluetoothPrivateDisconnectAllFunction() override;
+
+ void OnSuccessCallback();
+ void OnErrorCallback(scoped_refptr<device::BluetoothAdapter> adapter,
+ const std::string& device_address);
+
+ DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateDisconnectAllFunction);
+};
+
} // namespace core_api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698