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

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

Issue 2637343002: Implement WebBluetooth descriptor.readValue() (Closed)
Patch Set: run bad_message_reasons 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 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 "core/dom/ContextLifecycleObserver.h" 9 #include "core/dom/ContextLifecycleObserver.h"
10 #include "modules/EventTargetModules.h" 10 #include "modules/EventTargetModules.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 BluetoothRemoteGATTCharacteristic* getOrCreateRemoteGATTCharacteristic( 55 BluetoothRemoteGATTCharacteristic* getOrCreateRemoteGATTCharacteristic(
56 ExecutionContext*, 56 ExecutionContext*,
57 mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr, 57 mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr,
58 BluetoothRemoteGATTService*); 58 BluetoothRemoteGATTService*);
59 bool isValidCharacteristic(const String& characteristicInstanceId); 59 bool isValidCharacteristic(const String& characteristicInstanceId);
60 60
61 BluetoothRemoteGATTDescriptor* getOrCreateBluetoothRemoteGATTDescriptor( 61 BluetoothRemoteGATTDescriptor* getOrCreateBluetoothRemoteGATTDescriptor(
62 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr, 62 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr,
63 BluetoothRemoteGATTCharacteristic*); 63 BluetoothRemoteGATTCharacteristic*);
64 bool isValidDescriptor(const String& descriptorInstanceId);
64 65
65 // We should disconnect from the device in all of the following cases: 66 // We should disconnect from the device in all of the following cases:
66 // 1. When the object gets GarbageCollected e.g. it went out of scope. 67 // 1. When the object gets GarbageCollected e.g. it went out of scope.
67 // dispose() is called in this case. 68 // dispose() is called in this case.
68 // 2. When the parent document gets detached e.g. reloading a page. 69 // 2. When the parent document gets detached e.g. reloading a page.
69 // stop() is called in this case. 70 // stop() is called in this case.
70 // TODO(ortuno): Users should be able to turn on notifications for 71 // TODO(ortuno): Users should be able to turn on notifications for
71 // events on navigator.bluetooth and still remain connected even if the 72 // events on navigator.bluetooth and still remain connected even if the
72 // BluetoothDevice object is garbage collected. 73 // BluetoothDevice object is garbage collected.
73 74
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 Member<BluetoothAttributeInstanceMap> m_attributeInstanceMap; 112 Member<BluetoothAttributeInstanceMap> m_attributeInstanceMap;
112 113
113 mojom::blink::WebBluetoothDevicePtr m_device; 114 mojom::blink::WebBluetoothDevicePtr m_device;
114 Member<BluetoothRemoteGATTServer> m_gatt; 115 Member<BluetoothRemoteGATTServer> m_gatt;
115 Member<Bluetooth> m_bluetooth; 116 Member<Bluetooth> m_bluetooth;
116 }; 117 };
117 118
118 } // namespace blink 119 } // namespace blink
119 120
120 #endif // BluetoothDevice_h 121 #endif // BluetoothDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698