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

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

Issue 2443473003: bluetooth: Require frame to be connected for characteristic.readValue to succeed (Closed)
Patch Set: Fix typo Created 4 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 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 BluetoothRemoteGATTCharacteristic_h 5 #ifndef BluetoothRemoteGATTCharacteristic_h
6 #define BluetoothRemoteGATTCharacteristic_h 6 #define BluetoothRemoteGATTCharacteristic_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/ActiveDOMObject.h" 9 #include "core/dom/ActiveDOMObject.h"
10 #include "core/dom/DOMArrayPiece.h" 10 #include "core/dom/DOMArrayPiece.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ScriptPromise stopNotifications(ScriptState*); 89 ScriptPromise stopNotifications(ScriptState*);
90 90
91 DEFINE_ATTRIBUTE_EVENT_LISTENER(characteristicvaluechanged); 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(characteristicvaluechanged);
92 92
93 protected: 93 protected:
94 // EventTarget overrides. 94 // EventTarget overrides.
95 void addedEventListener(const AtomicString& eventType, 95 void addedEventListener(const AtomicString& eventType,
96 RegisteredEventListener&) override; 96 RegisteredEventListener&) override;
97 97
98 private: 98 private:
99 friend class ReadValueCallback;
100
101 BluetoothRemoteGATTServer* gatt() { return m_service->device()->gatt(); }
102
99 std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> m_webCharacteristic; 103 std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> m_webCharacteristic;
100 Member<BluetoothRemoteGATTService> m_service; 104 Member<BluetoothRemoteGATTService> m_service;
101 bool m_stopped; 105 bool m_stopped;
102 Member<BluetoothCharacteristicProperties> m_properties; 106 Member<BluetoothCharacteristicProperties> m_properties;
103 Member<DOMDataView> m_value; 107 Member<DOMDataView> m_value;
104 }; 108 };
105 109
106 } // namespace blink 110 } // namespace blink
107 111
108 #endif // BluetoothRemoteGATTCharacteristic_h 112 #endif // BluetoothRemoteGATTCharacteristic_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698