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

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

Issue 2565913002: [Onion Soup] Move WebBluetoothImpl from //content/renderer/bluetooth to Blink's bluetooth module (Closed)
Patch Set: renamed BluetoothUUID.typemap to Bluetooth.typemap Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 BluetoothRemoteGATTServer_h 5 #ifndef BluetoothRemoteGATTServer_h
6 #define BluetoothRemoteGATTServer_h 6 #define BluetoothRemoteGATTServer_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/modules/v8/StringOrUnsignedLong.h" 9 #include "bindings/modules/v8/StringOrUnsignedLong.h"
10 #include "modules/bluetooth/BluetoothDevice.h" 10 #include "modules/bluetooth/BluetoothDevice.h"
11 #include "platform/heap/Heap.h" 11 #include "platform/heap/Heap.h"
12 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj om-blink.h" 12 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
13 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class BluetoothDevice; 17 class BluetoothDevice;
18 class ScriptPromise; 18 class ScriptPromise;
19 class ScriptPromiseResolver; 19 class ScriptPromiseResolver;
20 class ScriptState; 20 class ScriptState;
21 21
22 // BluetoothRemoteGATTServer provides a way to interact with a connected 22 // BluetoothRemoteGATTServer provides a way to interact with a connected
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const StringOrUnsignedLong& service, 62 const StringOrUnsignedLong& service,
63 ExceptionState&); 63 ExceptionState&);
64 ScriptPromise getPrimaryServices(ScriptState*, ExceptionState&); 64 ScriptPromise getPrimaryServices(ScriptState*, ExceptionState&);
65 65
66 private: 66 private:
67 ScriptPromise getPrimaryServicesImpl( 67 ScriptPromise getPrimaryServicesImpl(
68 ScriptState*, 68 ScriptState*,
69 mojom::blink::WebBluetoothGATTQueryQuantity, 69 mojom::blink::WebBluetoothGATTQueryQuantity,
70 String serviceUUID = String()); 70 String serviceUUID = String());
71 71
72 void ConnectCallback(ScriptPromiseResolver*,
73 mojom::blink::WebBluetoothResult);
74 void GetPrimaryServicesCallback(
75 mojom::blink::WebBluetoothGATTQueryQuantity,
76 ScriptPromiseResolver*,
77 mojom::blink::WebBluetoothResult,
78 Optional<Vector<mojom::blink::WebBluetoothRemoteGATTServicePtr>>
79 services);
80
72 // Contains a ScriptPromiseResolver corresponding to each active algorithm 81 // Contains a ScriptPromiseResolver corresponding to each active algorithm
73 // using this server’s connection. 82 // using this server’s connection.
74 HeapHashSet<Member<ScriptPromiseResolver>> m_activeAlgorithms; 83 HeapHashSet<Member<ScriptPromiseResolver>> m_activeAlgorithms;
75 84
76 Member<BluetoothDevice> m_device; 85 Member<BluetoothDevice> m_device;
77 bool m_connected; 86 bool m_connected;
78 }; 87 };
79 88
80 } // namespace blink 89 } // namespace blink
81 90
82 #endif // BluetoothDevice_h 91 #endif // BluetoothDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698