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

Unified Diff: public/platform/modules/bluetooth/WebBluetooth.h

Issue 1093633003: bluetooh: Define new connectGATT and WebBluetoothGATTRemoteServer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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: public/platform/modules/bluetooth/WebBluetooth.h
diff --git a/public/platform/modules/bluetooth/WebBluetooth.h b/public/platform/modules/bluetooth/WebBluetooth.h
index 5a117dabb65c0fc65342c335b83e857ed694cf8a..5b79d00bbd3a8a9dfd4ec089f4cb987d80d7e5ea 100644
--- a/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/public/platform/modules/bluetooth/WebBluetooth.h
@@ -11,18 +11,35 @@ namespace blink {
struct WebBluetoothDevice;
struct WebBluetoothError;
+struct WebBluetoothGATTRemoteServer;
// Success and failure callbacks for requestDevice.
// WebBluetoothDevice and WebBluetoothError object ownership is transfered.
typedef WebCallbacks<WebBluetoothDevice, WebBluetoothError> WebBluetoothRequestDeviceCallbacks;
+// Success and failure callbacks for connectGATT.
+typedef WebCallbacks<WebBluetoothGATTRemoteServer, WebBluetoothError> WebBluetoothConnectGATTCallbacks;
+
class WebBluetooth {
public:
virtual ~WebBluetooth() { }
- // Requests a bluetooth device.
+ // BluetoothDiscovery Methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdiscovery
// WebBluetoothRequestDeviceCallbacks ownership transferred to the client.
Jeffrey Yasskin 2015/04/17 23:45:08 Should we have a comment like this for the ownersh
ortuno 2015/04/20 18:32:44 Done
virtual void requestDevice(WebBluetoothRequestDeviceCallbacks*) = 0;
+
+ // BluetoothDevice methods:
scheib 2015/04/18 00:06:52 OK, we're going 'monolithic' which we agreed with
ortuno 2015/04/20 18:32:44 Ack.
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdevice
+ virtual void connectGATT(std::string, WebBluetoothConnectGATTCallbacks*) { }
Jeffrey Yasskin 2015/04/17 23:45:08 Great! You're following the advice from https://gi
Jeffrey Yasskin 2015/04/17 23:45:08 Comment what this string means, or give the argume
scheib 2015/04/19 05:40:37 It is instanceID, oops I overlooked this too: Plea
ortuno 2015/04/20 18:32:44 Done.
ortuno 2015/04/20 18:32:44 Done.
+
+ // BluetoothGATTRemoteServer methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothgattremoteserver
+ virtual void disconnect() { }
+ // TODO(ortuno): Properly define this methods once WebBluetoothServiceUuid and
Jeffrey Yasskin 2015/04/17 23:45:08 s/this/these/
scheib 2015/04/18 00:06:52 s/this/these/. If line wrapping, do so before 80 c
ortuno 2015/04/20 18:32:44 Done.
+ // WebBluetoothGATTService are defined.
+ // virtual void getPrimaryService() { }
+ // virtual void getPrimaryServices() { }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698