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

Unified Diff: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h

Issue 1436783002: Oilpan: tidy up AutoplayExperimentHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
index 9b66a91142a6decbb85ab56cafa34206f4e0663e..a35406017692312b1c2aab08fc8c726e0ca14326 100644
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
+++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
@@ -67,9 +67,10 @@ enum AutoplayMetrics {
NumberOfAutoplayMetrics,
};
-class AutoplayExperimentHelper {
+class AutoplayExperimentHelper final {
+ DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
public:
- AutoplayExperimentHelper(HTMLMediaElement&);
+ explicit AutoplayExperimentHelper(HTMLMediaElement&);
~AutoplayExperimentHelper();
void becameReadyToPlay();
@@ -103,6 +104,11 @@ public:
PlayMuted = 1 << 6,
};
+ DEFINE_INLINE_TRACE()
+ {
+ visitor->trace(m_element);
+ }
+
private:
// Register to receive position updates, if we haven't already. If we
// have, then this does nothing.
@@ -139,6 +145,8 @@ private:
// Return our media element's document.
Document& document() const;
+ HTMLMediaElement& element() const;
+
inline bool enabled(Mode mode) const
{
return ((int)m_mode) & ((int)mode);
@@ -146,8 +154,7 @@ private:
Mode fromString(const String& mode);
-private:
- HTMLMediaElement& m_element;
+ RawPtrWillBeMember<HTMLMediaElement> m_element;
Mode m_mode;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698