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

Unified Diff: Source/modules/device_orientation/DeviceOrientationDispatcher.h

Issue 619383002: Move PlatformEventDispatcher implementations to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix non-Oilpan allocation of DeviceLightDispatcher singleton Created 6 years, 2 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: Source/modules/device_orientation/DeviceOrientationDispatcher.h
diff --git a/Source/modules/device_orientation/DeviceOrientationDispatcher.h b/Source/modules/device_orientation/DeviceOrientationDispatcher.h
index 66bdd53516120d46507a774b1c718cdaa22190c6..4a75df9e11de199760ea889a135fdd4f5e70aaf1 100644
--- a/Source/modules/device_orientation/DeviceOrientationDispatcher.h
+++ b/Source/modules/device_orientation/DeviceOrientationDispatcher.h
@@ -43,26 +43,29 @@ class DeviceOrientationData;
class WebDeviceOrientationData;
// This class listens to device orientation data and notifies all registered controllers.
-class DeviceOrientationDispatcher : public PlatformEventDispatcher, public WebDeviceOrientationListener {
+class DeviceOrientationDispatcher final : public GarbageCollectedFinalized<DeviceOrientationDispatcher>, public PlatformEventDispatcher, public WebDeviceOrientationListener {
+ USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher);
public:
static DeviceOrientationDispatcher& instance();
+ virtual ~DeviceOrientationDispatcher();
// Note that the returned object is owned by this class.
// FIXME: make the return value const, see crbug.com/233174.
DeviceOrientationData* latestDeviceOrientationData();
// Inherited from WebDeviceOrientationListener.
- virtual void didChangeDeviceOrientation(const WebDeviceOrientationData&) OVERRIDE;
+ virtual void didChangeDeviceOrientation(const WebDeviceOrientationData&) override;
+
+ virtual void trace(Visitor*) override;
private:
DeviceOrientationDispatcher();
- ~DeviceOrientationDispatcher();
// Inherited from PlatformEventDispatcher.
- virtual void startListening() OVERRIDE;
- virtual void stopListening() OVERRIDE;
+ virtual void startListening() override;
+ virtual void stopListening() override;
- Persistent<DeviceOrientationData> m_lastDeviceOrientationData;
+ Member<DeviceOrientationData> m_lastDeviceOrientationData;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698