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

Unified Diff: Source/modules/battery/BatteryDispatcher.cpp

Issue 620683006: Move PlatformEventDispatcher implementations to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sof-fix-platform
Patch Set: Set baseurl 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
« no previous file with comments | « Source/modules/battery/BatteryDispatcher.h ('k') | Source/modules/device_light/DeviceLightDispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/battery/BatteryDispatcher.cpp
diff --git a/Source/modules/battery/BatteryDispatcher.cpp b/Source/modules/battery/BatteryDispatcher.cpp
index f71d9c6f2c773866d946e807d80c29f4255e291b..446d67c53e17b7268e6c536e7748e4995a79eb84 100644
--- a/Source/modules/battery/BatteryDispatcher.cpp
+++ b/Source/modules/battery/BatteryDispatcher.cpp
@@ -13,8 +13,8 @@ namespace blink {
BatteryDispatcher& BatteryDispatcher::instance()
{
- DEFINE_STATIC_LOCAL(BatteryDispatcher, batteryDispatcher, ());
- return batteryDispatcher;
+ DEFINE_STATIC_LOCAL(Persistent<BatteryDispatcher>, batteryDispatcher, (new BatteryDispatcher()));
+ return *batteryDispatcher;
}
BatteryDispatcher::BatteryDispatcher()
@@ -25,6 +25,12 @@ BatteryDispatcher::~BatteryDispatcher()
{
}
+void BatteryDispatcher::trace(Visitor* visitor)
+{
+ visitor->trace(m_batteryStatus);
+ PlatformEventDispatcher::trace(visitor);
+}
+
void BatteryDispatcher::updateBatteryStatus(const WebBatteryStatus& batteryStatus)
{
m_batteryStatus = BatteryStatus::create(batteryStatus.charging, batteryStatus.chargingTime, batteryStatus.dischargingTime, batteryStatus.level);
« no previous file with comments | « Source/modules/battery/BatteryDispatcher.h ('k') | Source/modules/device_light/DeviceLightDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698