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

Unified Diff: Source/modules/device_light/DeviceLightDispatcher.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_light/DeviceLightDispatcher.h
diff --git a/Source/modules/device_light/DeviceLightDispatcher.h b/Source/modules/device_light/DeviceLightDispatcher.h
index 7e0cb6fc67969836cbfded5e76510714aec4672f..fef082215ca3b240c3fd2be5a8a8ee764a5271e7 100644
--- a/Source/modules/device_light/DeviceLightDispatcher.h
+++ b/Source/modules/device_light/DeviceLightDispatcher.h
@@ -6,6 +6,7 @@
#define DeviceLightDispatcher_h
#include "core/frame/PlatformEventDispatcher.h"
+#include "platform/heap/Handle.h"
#include "public/platform/WebDeviceLightListener.h"
#include "wtf/RefPtr.h"
@@ -14,22 +15,25 @@ namespace blink {
class DeviceLightController;
// This class listens to device light data and notifies all registered controllers.
-class DeviceLightDispatcher FINAL : public PlatformEventDispatcher, public WebDeviceLightListener {
+class DeviceLightDispatcher final : public GarbageCollectedFinalized<DeviceLightDispatcher>, public PlatformEventDispatcher, public WebDeviceLightListener {
+ USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher);
public:
static DeviceLightDispatcher& instance();
+ virtual ~DeviceLightDispatcher();
double latestDeviceLightData() const;
// Inherited from WebDeviceLightListener.
- virtual void didChangeDeviceLight(double) OVERRIDE;
+ virtual void didChangeDeviceLight(double) override;
+
+ virtual void trace(Visitor*) override;
private:
DeviceLightDispatcher();
- virtual ~DeviceLightDispatcher();
// Inherited from PlatformEventDispatcher.
- virtual void startListening() OVERRIDE;
- virtual void stopListening() OVERRIDE;
+ virtual void startListening() override;
+ virtual void stopListening() override;
double m_lastDeviceLightData;
};
« no previous file with comments | « Source/modules/device_light/DeviceLightController.cpp ('k') | Source/modules/device_light/DeviceLightDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698