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

Unified Diff: Source/modules/battery/BatteryStatus.h

Issue 341053002: Oilpan: move BatteryStatus to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/battery/BatteryStatus.h
diff --git a/Source/modules/battery/BatteryStatus.h b/Source/modules/battery/BatteryStatus.h
index 5557bc97650a301ac3ded0a2302f5d9de646f18e..fdccb98f3a4b2887e86950bc2da8a0c2fb2b3cee 100644
--- a/Source/modules/battery/BatteryStatus.h
+++ b/Source/modules/battery/BatteryStatus.h
@@ -5,21 +5,24 @@
#ifndef BatteryStatus_h
#define BatteryStatus_h
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
-class BatteryStatus : public RefCounted<BatteryStatus> {
+class BatteryStatus FINAL : public RefCountedWillBeGarbageCollected<BatteryStatus> {
public:
- static PassRefPtr<BatteryStatus> create();
- static PassRefPtr<BatteryStatus> create(bool charging, double chargingTime, double dischargingTime, double level);
+ static PassRefPtrWillBeRawPtr<BatteryStatus> create();
+ static PassRefPtrWillBeRawPtr<BatteryStatus> create(bool charging, double chargingTime, double dischargingTime, double level);
bool charging() const { return m_charging; }
double chargingTime() const { return m_chargingTime; }
double dischargingTime() const { return m_dischargingTime; }
double level() const { return m_level; }
+ void trace(Visitor*) { }
+
private:
BatteryStatus();
BatteryStatus(bool charging, double chargingTime, double dischargingTime, double level);
@@ -33,4 +36,3 @@ private:
} // namespace WebCore
#endif // BatteryStatus_h
-

Powered by Google App Engine
This is Rietveld 408576698