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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h

Issue 1427653003: bluetooth: Implement TxPower and RSSI of BluetoothAdvertisementData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Change PowerValueAdapter to int8_t Created 5 years, 1 month 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 BluetoothDevice_h 5 #ifndef BluetoothDevice_h
6 #define BluetoothDevice_h 6 #define BluetoothDevice_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/bluetooth/BluetoothAdvertisingData.h"
9 #include "platform/heap/Heap.h" 10 #include "platform/heap/Heap.h"
10 #include "public/platform/modules/bluetooth/WebBluetoothDevice.h" 11 #include "public/platform/modules/bluetooth/WebBluetoothDevice.h"
11 #include "wtf/OwnPtr.h" 12 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h" 13 #include "wtf/PassOwnPtr.h"
13 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class ScriptPromise; 18 class ScriptPromise;
18 class ScriptPromiseResolver; 19 class ScriptPromiseResolver;
(...skipping 12 matching lines...) Expand all
31 public: 32 public:
32 BluetoothDevice(PassOwnPtr<WebBluetoothDevice>); 33 BluetoothDevice(PassOwnPtr<WebBluetoothDevice>);
33 34
34 ScriptPromise connectGATT(ScriptState*); 35 ScriptPromise connectGATT(ScriptState*);
35 36
36 // Interface required by CallbackPromiseAdapter: 37 // Interface required by CallbackPromiseAdapter:
37 using WebType = OwnPtr<WebBluetoothDevice>; 38 using WebType = OwnPtr<WebBluetoothDevice>;
38 static BluetoothDevice* take(ScriptPromiseResolver*, PassOwnPtr<WebBluetooth Device>); 39 static BluetoothDevice* take(ScriptPromiseResolver*, PassOwnPtr<WebBluetooth Device>);
39 40
40 // Interface required by Garbage Collection: 41 // Interface required by Garbage Collection:
41 DEFINE_INLINE_TRACE() { } 42 DECLARE_VIRTUAL_TRACE();
42 43
43 // IDL exposed interface: 44 // IDL exposed interface:
44 String id() { return m_webDevice->id; } 45 String id() { return m_webDevice->id; }
45 String name() { return m_webDevice->name; } 46 String name() { return m_webDevice->name; }
47 BluetoothAdvertisingData* adData() { return m_adData; }
46 unsigned deviceClass(bool& isNull); 48 unsigned deviceClass(bool& isNull);
47 String vendorIDSource(); 49 String vendorIDSource();
48 unsigned vendorID(bool& isNull); 50 unsigned vendorID(bool& isNull);
49 unsigned productID(bool& isNull); 51 unsigned productID(bool& isNull);
50 unsigned productVersion(bool& isNull); 52 unsigned productVersion(bool& isNull);
51 bool paired(); 53 bool paired();
52 Vector<String> uuids(); 54 Vector<String> uuids();
53 55
54 private: 56 private:
55 OwnPtr<WebBluetoothDevice> m_webDevice; 57 OwnPtr<WebBluetoothDevice> m_webDevice;
58 Member<BluetoothAdvertisingData> m_adData;
56 }; 59 };
57 60
58 } // namespace blink 61 } // namespace blink
59 62
60 #endif // BluetoothDevice_h 63 #endif // BluetoothDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698