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

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

Issue 204063002: Oilpan: add transition types to Navigator and its supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust use of 'virtual' Created 6 years, 9 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/NavigatorBattery.h ('k') | Source/modules/donottrack/NavigatorDoNotTrack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/battery/NavigatorBattery.cpp
diff --git a/Source/modules/battery/NavigatorBattery.cpp b/Source/modules/battery/NavigatorBattery.cpp
index 612bb951e25d210bed10f56d2e179af06b12a6eb..c3416912f1198a2012e8815ee05d7581a8ed8677 100644
--- a/Source/modules/battery/NavigatorBattery.cpp
+++ b/Source/modules/battery/NavigatorBattery.cpp
@@ -37,12 +37,17 @@ const char* NavigatorBattery::supplementName()
NavigatorBattery& NavigatorBattery::from(Navigator& navigator)
{
- NavigatorBattery* supplement = static_cast<NavigatorBattery*>(Supplement<Navigator>::from(navigator, supplementName()));
+ NavigatorBattery* supplement = static_cast<NavigatorBattery*>(WillBeHeapSupplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
supplement = new NavigatorBattery();
- provideTo(navigator, supplementName(), adoptPtr(supplement));
+ provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
}
return *supplement;
}
+void NavigatorBattery::trace(Visitor* visitor)
+{
+ visitor->trace(m_batteryManager);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/modules/battery/NavigatorBattery.h ('k') | Source/modules/donottrack/NavigatorDoNotTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698