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

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

Issue 2366253002: Remove ActiveDOMObject::stop() (Closed)
Patch Set: temp Created 4 years, 2 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 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h" 5 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMDataView.h" 10 #include "core/dom/DOMDataView.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void BluetoothRemoteGATTCharacteristic::setValue(DOMDataView* domDataView) { 66 void BluetoothRemoteGATTCharacteristic::setValue(DOMDataView* domDataView) {
67 m_value = domDataView; 67 m_value = domDataView;
68 } 68 }
69 69
70 void BluetoothRemoteGATTCharacteristic::dispatchCharacteristicValueChanged( 70 void BluetoothRemoteGATTCharacteristic::dispatchCharacteristicValueChanged(
71 const WebVector<uint8_t>& value) { 71 const WebVector<uint8_t>& value) {
72 this->setValue(ConvertWebVectorToDataView(value)); 72 this->setValue(ConvertWebVectorToDataView(value));
73 dispatchEvent(Event::create(EventTypeNames::characteristicvaluechanged)); 73 dispatchEvent(Event::create(EventTypeNames::characteristicvaluechanged));
74 } 74 }
75 75
76 void BluetoothRemoteGATTCharacteristic::stop() { 76 void BluetoothRemoteGATTCharacteristic::contextDestroyed() {
77 notifyCharacteristicObjectRemoved(); 77 notifyCharacteristicObjectRemoved();
78 } 78 }
79 79
80 void BluetoothRemoteGATTCharacteristic::dispose() { 80 void BluetoothRemoteGATTCharacteristic::dispose() {
81 notifyCharacteristicObjectRemoved(); 81 notifyCharacteristicObjectRemoved();
82 } 82 }
83 83
84 void BluetoothRemoteGATTCharacteristic::notifyCharacteristicObjectRemoved() { 84 void BluetoothRemoteGATTCharacteristic::notifyCharacteristicObjectRemoved() {
85 if (!m_stopped) { 85 if (!m_stopped) {
86 m_stopped = true; 86 m_stopped = true;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 DEFINE_TRACE(BluetoothRemoteGATTCharacteristic) { 284 DEFINE_TRACE(BluetoothRemoteGATTCharacteristic) {
285 visitor->trace(m_service); 285 visitor->trace(m_service);
286 visitor->trace(m_properties); 286 visitor->trace(m_properties);
287 visitor->trace(m_value); 287 visitor->trace(m_value);
288 EventTargetWithInlineData::trace(visitor); 288 EventTargetWithInlineData::trace(visitor);
289 ActiveDOMObject::trace(visitor); 289 ActiveDOMObject::trace(visitor);
290 } 290 }
291 291
292 } // namespace blink 292 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698