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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp

Issue 1991063002: Implement the gattserverdisconnected event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-web-bluetooth-device
Patch Set: Skip the new tests on Mac, where getCharacteristic isn't implemented yet. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
index 858493d1431362e717da5d7a63f5fddd52c23bf1..32643cae9f27b6b10e9ae3cd54031bd06bc69f6e 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -63,6 +63,14 @@ ExecutionContext* BluetoothDevice::getExecutionContext() const
return ActiveDOMObject::getExecutionContext();
}
+void BluetoothDevice::dispatchGattServerDisconnected()
+{
+ if (m_gatt->connected()) {
+ m_gatt->setConnected(false);
+ dispatchEvent(Event::createBubble(EventTypeNames::gattserverdisconnected));
+ }
+}
+
DEFINE_TRACE(BluetoothDevice)
{
EventTargetWithInlineData::trace(visitor);

Powered by Google App Engine
This is Rietveld 408576698