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

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

Issue 2142813003: bluetooth: Avoid including non-blink mojo bindings in blink code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Add DCHECK for enum Created 4 years, 5 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 BluetoothRemoteGATTService_h 5 #ifndef BluetoothRemoteGATTService_h
6 #define BluetoothRemoteGATTService_h 6 #define BluetoothRemoteGATTService_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/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "platform/heap/Heap.h" 12 #include "platform/heap/Heap.h"
13 #include "public/platform/modules/bluetooth/WebBluetoothRemoteGATTService.h" 13 #include "public/platform/modules/bluetooth/WebBluetoothRemoteGATTService.h"
14 #include "public/platform/modules/bluetooth/web_bluetooth.mojom.h" 14 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
15 #include "wtf/text/WTFString.h" 15 #include "wtf/text/WTFString.h"
16 #include <memory> 16 #include <memory>
17 17
18 namespace blink { 18 namespace blink {
19 19
20 class ScriptPromise; 20 class ScriptPromise;
21 class ScriptPromiseResolver; 21 class ScriptPromiseResolver;
22 class ScriptState; 22 class ScriptState;
23 23
24 // Represents a GATT Service within a Bluetooth Peripheral, a collection of 24 // Represents a GATT Service within a Bluetooth Peripheral, a collection of
(...skipping 20 matching lines...) Expand all
45 45
46 // IDL exposed interface: 46 // IDL exposed interface:
47 String uuid() { return m_webService->uuid; } 47 String uuid() { return m_webService->uuid; }
48 bool isPrimary() { return m_webService->isPrimary; } 48 bool isPrimary() { return m_webService->isPrimary; }
49 BluetoothDevice* device() { return m_device; } 49 BluetoothDevice* device() { return m_device; }
50 ScriptPromise getCharacteristic(ScriptState*, const StringOrUnsignedLong& ch aracteristic, ExceptionState&); 50 ScriptPromise getCharacteristic(ScriptState*, const StringOrUnsignedLong& ch aracteristic, ExceptionState&);
51 ScriptPromise getCharacteristics(ScriptState*, const StringOrUnsignedLong& c haracteristic, ExceptionState&); 51 ScriptPromise getCharacteristics(ScriptState*, const StringOrUnsignedLong& c haracteristic, ExceptionState&);
52 ScriptPromise getCharacteristics(ScriptState*, ExceptionState&); 52 ScriptPromise getCharacteristics(ScriptState*, ExceptionState&);
53 53
54 private: 54 private:
55 ScriptPromise getCharacteristicsImpl(ScriptState*, mojom::WebBluetoothGATTQu eryQuantity, String characteristicUUID = String()); 55 ScriptPromise getCharacteristicsImpl(ScriptState*, mojom::blink::WebBluetoot hGATTQueryQuantity, String characteristicUUID = String());
56 56
57 std::unique_ptr<WebBluetoothRemoteGATTService> m_webService; 57 std::unique_ptr<WebBluetoothRemoteGATTService> m_webService;
58 Member<BluetoothDevice> m_device; 58 Member<BluetoothDevice> m_device;
59 }; 59 };
60 60
61 } // namespace blink 61 } // namespace blink
62 62
63 #endif // BluetoothRemoteGATTService_h 63 #endif // BluetoothRemoteGATTService_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698