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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef BluetoothDevice_h 5 #ifndef BluetoothDevice_h
6 #define BluetoothDevice_h 6 #define BluetoothDevice_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/ContextLifecycleObserver.h" 9 #include "core/dom/ContextLifecycleObserver.h"
10 #include "modules/EventTargetModules.h" 10 #include "modules/EventTargetModules.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // stop() is called in this case. 64 // stop() is called in this case.
65 // TODO(ortuno): Users should be able to turn on notifications for 65 // TODO(ortuno): Users should be able to turn on notifications for
66 // events on navigator.bluetooth and still remain connected even if the 66 // events on navigator.bluetooth and still remain connected even if the
67 // BluetoothDevice object is garbage collected. 67 // BluetoothDevice object is garbage collected.
68 68
69 // USING_PRE_FINALIZER interface. 69 // USING_PRE_FINALIZER interface.
70 // Called before the object gets garbage collected. 70 // Called before the object gets garbage collected.
71 void dispose(); 71 void dispose();
72 72
73 // ContextLifecycleObserver interface. 73 // ContextLifecycleObserver interface.
74 void contextDestroyed() override; 74 void contextDestroyed(ExecutionContext*) override;
75 75
76 // If gatt is connected then sets gatt.connected to false and disconnects. 76 // If gatt is connected then sets gatt.connected to false and disconnects.
77 // This function only performs the necessary steps to ensure a device 77 // This function only performs the necessary steps to ensure a device
78 // disconnects therefore it should only be used when the object is being 78 // disconnects therefore it should only be used when the object is being
79 // garbage collected or the context is being destroyed. 79 // garbage collected or the context is being destroyed.
80 void disconnectGATTIfConnected(); 80 void disconnectGATTIfConnected();
81 81
82 // Performs necessary cleanup when a device disconnects and fires 82 // Performs necessary cleanup when a device disconnects and fires
83 // gattserverdisconnected event. 83 // gattserverdisconnected event.
84 void cleanupDisconnectedDeviceAndFireEvent(); 84 void cleanupDisconnectedDeviceAndFireEvent();
(...skipping 21 matching lines...) Expand all
106 Member<BluetoothAttributeInstanceMap> m_attributeInstanceMap; 106 Member<BluetoothAttributeInstanceMap> m_attributeInstanceMap;
107 107
108 mojom::blink::WebBluetoothDevicePtr m_device; 108 mojom::blink::WebBluetoothDevicePtr m_device;
109 Member<BluetoothRemoteGATTServer> m_gatt; 109 Member<BluetoothRemoteGATTServer> m_gatt;
110 Member<Bluetooth> m_bluetooth; 110 Member<Bluetooth> m_bluetooth;
111 }; 111 };
112 112
113 } // namespace blink 113 } // namespace blink
114 114
115 #endif // BluetoothDevice_h 115 #endif // BluetoothDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698