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

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

Issue 349433002: chrome.bluetoothLowEnergy: Introduce connect and disconnect methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased & marked occurrences isLocal as nodoc Created 6 years, 6 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 | chrome/browser/extensions/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: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h
index 48e8f1348089daea52bd36bc62404dbbad65d170..3fd57ed2a11e62045844fb7a4364985bb137b804 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h
@@ -74,6 +74,44 @@ class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction {
DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyExtensionFunction);
};
+class BluetoothLowEnergyConnectFunction
+ : public BluetoothLowEnergyExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.connect",
+ BLUETOOTHLOWENERGY_CONNECT);
+
+ protected:
+ virtual ~BluetoothLowEnergyConnectFunction() {}
+
+ // BluetoothLowEnergyExtensionFunction override.
+ virtual bool DoWork() OVERRIDE;
+
+ private:
+ // Success and error callbacks, called by
+ // BluetoothLowEnergyEventRouter::Connect.
+ void SuccessCallback();
+ void ErrorCallback(BluetoothLowEnergyEventRouter::Status status);
+};
+
+class BluetoothLowEnergyDisconnectFunction
+ : public BluetoothLowEnergyExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.disconnect",
+ BLUETOOTHLOWENERGY_DISCONNECT);
+
+ protected:
+ virtual ~BluetoothLowEnergyDisconnectFunction() {}
+
+ // BluetoothLowEnergyExtensionFunction override.
+ virtual bool DoWork() OVERRIDE;
+
+ private:
+ // Success and error callbacks, called by
+ // BluetoothLowEnergyEventRouter::Disconnect.
+ void SuccessCallback();
+ void ErrorCallback(BluetoothLowEnergyEventRouter::Status status);
+};
+
class BluetoothLowEnergyGetServiceFunction
: public BluetoothLowEnergyExtensionFunction {
public:
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698