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

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: 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..a951e9deadbd9e115c7c67a3c1d8294ad9df87c0 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -63,6 +63,15 @@ ExecutionContext* BluetoothDevice::getExecutionContext() const
return ActiveDOMObject::getExecutionContext();
}
+void BluetoothDevice::dispatchGattServerDisconnected()
+{
+ LOG(ERROR) << "dispatching disconnected. Was connected? " << m_gatt->connected();
scheib 2016/05/19 01:26:57 Did you intend to leave this?
Jeffrey Yasskin 2016/05/19 17:47:07 Nope, removed. Thanks.
+ 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