| 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 57585d5790b2e8c6de06b4eb55c6bb7f6d75bf60..eccadad46ac0a59969ee59a37b99a40087bfedcc 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
|
| @@ -8,10 +8,8 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptPromiseResolver.h"
|
| #include "core/dom/DOMException.h"
|
| -#include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/events/Event.h"
|
| -#include "core/page/PageVisibilityState.h"
|
| #include "modules/bluetooth/BluetoothError.h"
|
| #include "modules/bluetooth/BluetoothRemoteGATTServer.h"
|
| #include "modules/bluetooth/BluetoothSupplement.h"
|
| @@ -21,10 +19,8 @@ namespace blink {
|
|
|
| BluetoothDevice::BluetoothDevice(ExecutionContext* context, PassOwnPtr<WebBluetoothDevice> webDevice)
|
| : ActiveDOMObject(context)
|
| - , PageLifecycleObserver(toDocument(context)->page())
|
| , m_webDevice(webDevice)
|
| - , m_adData(BluetoothAdvertisingData::create(m_webDevice->txPower,
|
| - m_webDevice->rssi))
|
| + , m_adData(BluetoothAdvertisingData::create(m_webDevice->txPower, m_webDevice->rssi))
|
| , m_gatt(BluetoothRemoteGATTServer::create(this))
|
| {
|
| // See example in Source/platform/heap/ThreadState.h
|
| @@ -49,13 +45,6 @@ void BluetoothDevice::stop()
|
| disconnectGATTIfConnected();
|
| }
|
|
|
| -void BluetoothDevice::pageVisibilityChanged()
|
| -{
|
| - if (!page()->isPageVisible() && disconnectGATTIfConnected()) {
|
| - dispatchEvent(Event::create(EventTypeNames::gattserverdisconnected));
|
| - }
|
| -}
|
| -
|
| bool BluetoothDevice::disconnectGATTIfConnected()
|
| {
|
| if (m_gatt->connected()) {
|
| @@ -80,7 +69,6 @@ DEFINE_TRACE(BluetoothDevice)
|
| {
|
| RefCountedGarbageCollectedEventTargetWithInlineData<BluetoothDevice>::trace(visitor);
|
| ActiveDOMObject::trace(visitor);
|
| - PageLifecycleObserver::trace(visitor);
|
| visitor->trace(m_adData);
|
| visitor->trace(m_gatt);
|
| }
|
|
|