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

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: const reference 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
« no previous file with comments | « no previous file | public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..da04868cd365f620d352b46713eaff5c15aacb56 100644
--- a/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/public/platform/modules/bluetooth/WebBluetooth.h
@@ -6,23 +6,43 @@
#define WebBluetooth_h
#include "public/platform/WebCallbacks.h"
+#include "public/platform/WebString.h"
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.
virtual void requestDevice(WebBluetoothRequestDeviceCallbacks*) = 0;
+
+ // BluetoothDevice methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdevice
+ // WebBluetoothConnectGATTCallbacks ownership transferred to the callee.
+ virtual void connectGATT(const WebString& /* deviceInstanceID */,
+ WebBluetoothConnectGATTCallbacks*) { }
+
+ // BluetoothGATTRemoteServer methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothgattremoteserver
+ virtual void disconnect() { }
+ // TODO(ortuno): Properly define these methods once WebBluetoothServiceUuid
+ // and WebBluetoothGATTService are defined.
+ // virtual void getPrimaryService() { }
+ // virtual void getPrimaryServices() { }
};
} // namespace blink
« no previous file with comments | « no previous file | public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698