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

Side by Side Diff: public/platform/modules/bluetooth/WebBluetooth.h

Issue 1174843002: Add tests for RequestDeviceOptions and clean up. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Comment how the ScanFilterCheckingAdapter test works Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebBluetooth_h 5 #ifndef WebBluetooth_h
6 #define WebBluetooth_h 6 #define WebBluetooth_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebString.h" 9 #include "public/platform/WebString.h"
10 #include "public/platform/WebVector.h" 10 #include "public/platform/WebVector.h"
(...skipping 27 matching lines...) Expand all
38 // WebVector and WebBluetoothError object ownership is transferred. 38 // WebVector and WebBluetoothError object ownership is transferred.
39 typedef WebCallbacks<WebVector<uint8_t>, WebBluetoothError> WebBluetoothReadValu eCallbacks; 39 typedef WebCallbacks<WebVector<uint8_t>, WebBluetoothError> WebBluetoothReadValu eCallbacks;
40 40
41 class WebBluetooth { 41 class WebBluetooth {
42 public: 42 public:
43 virtual ~WebBluetooth() { } 43 virtual ~WebBluetooth() { }
44 44
45 // BluetoothDiscovery Methods: 45 // BluetoothDiscovery Methods:
46 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdisc overy 46 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdisc overy
47 // WebBluetoothRequestDeviceCallbacks ownership transferred to the client. 47 // WebBluetoothRequestDeviceCallbacks ownership transferred to the client.
48 virtual void requestDevice(const WebRequestDeviceOptions&, WebBluetoothReque stDeviceCallbacks* callbacks) { requestDevice(callbacks); } 48 virtual void requestDevice(const WebRequestDeviceOptions&, WebBluetoothReque stDeviceCallbacks*) { }
49 // TODO(jyasskin): Remove this overload after
50 // https://codereview.chromium.org/1172853004/ lands.
51 virtual void requestDevice(WebBluetoothRequestDeviceCallbacks*) { }
52 49
53 // BluetoothDevice methods: 50 // BluetoothDevice methods:
54 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdevi ce 51 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothdevi ce
55 // WebBluetoothConnectGATTCallbacks ownership transferred to the callee. 52 // WebBluetoothConnectGATTCallbacks ownership transferred to the callee.
56 virtual void connectGATT(const WebString& /* deviceInstanceID */, 53 virtual void connectGATT(const WebString& /* deviceInstanceID */,
57 WebBluetoothConnectGATTCallbacks*) { } 54 WebBluetoothConnectGATTCallbacks*) { }
58 55
59 // BluetoothGATTRemoteServer methods: 56 // BluetoothGATTRemoteServer methods:
60 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothgatt remoteserver 57 // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothgatt remoteserver
61 virtual void disconnect() { } 58 virtual void disconnect() { }
(...skipping 10 matching lines...) Expand all
72 69
73 // BluetoothGATTCharacteristic methods: 70 // BluetoothGATTCharacteristic methods:
74 // See https://webbluetoothcg.github.io/web-bluetooth/#bluetoothgattcharacte ristic 71 // See https://webbluetoothcg.github.io/web-bluetooth/#bluetoothgattcharacte ristic
75 virtual void readValue(const WebString& characteristicInstanceID, 72 virtual void readValue(const WebString& characteristicInstanceID,
76 WebBluetoothReadValueCallbacks*) { } 73 WebBluetoothReadValueCallbacks*) { }
77 }; 74 };
78 75
79 } // namespace blink 76 } // namespace blink
80 77
81 #endif // WebBluetooth_h 78 #endif // WebBluetooth_h
OLDNEW
« LayoutTests/bluetooth/requestDevice.html ('K') | « LayoutTests/bluetooth/requestDevice.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698