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

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

Issue 1859463002: bluetooth: Remove disconnect when page hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address jyasskin's comments Created 4 years, 8 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.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
index 1eb90a3ceb111e5e5da5ce0b29a91a9283d37f59..f8ed9d43891c286c3853539b0fde29c11d0a9a6b 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -7,7 +7,6 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ActiveDOMObject.h"
-#include "core/page/PageLifecycleObserver.h"
#include "modules/EventTargetModules.h"
#include "modules/bluetooth/BluetoothAdvertisingData.h"
#include "modules/bluetooth/BluetoothRemoteGATTServer.h"
@@ -32,8 +31,7 @@ class ScriptState;
// CallbackPromiseAdapter class comments.
class BluetoothDevice final
: public RefCountedGarbageCollectedEventTargetWithInlineData<BluetoothDevice>
- , public ActiveDOMObject
- , public PageLifecycleObserver {
+ , public ActiveDOMObject {
USING_PRE_FINALIZER(BluetoothDevice, dispose);
DEFINE_WRAPPERTYPEINFO();
REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(BluetoothDevice);
@@ -50,15 +48,9 @@ public:
// dispose() is called in this case.
// 2. When the parent document gets detached e.g. reloading a page.
// stop() is called in this case.
- // 3. For now (https://crbug.com/579746), when the tab is no longer in the
- // foreground e.g. change tabs.
- // pageVisibilityChanged() is called in this case.
// TODO(ortuno): Users should be able to turn on notifications for
// events on navigator.bluetooth and still remain connected even if the
// BluetoothDevice object is garbage collected.
- // TODO(ortuno): Allow connections when the tab is in the background.
- // This is a short term solution instead of implementing a tab indicator
- // for bluetooth connections.
// USING_PRE_FINALIZER interface.
// Called before the object gets garbage collected.
@@ -67,9 +59,6 @@ public:
// ActiveDOMObject interface.
void stop() override;
- // PageLifecycleObserver interface.
- void pageVisibilityChanged() override;
-
// If gatt is connected then disconnects and sets gatt.connected to false.
// Returns true if gatt was disconnected.
bool disconnectGATTIfConnected();

Powered by Google App Engine
This is Rietveld 408576698