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

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

Issue 2000023002: Tidy AutoplayExperimentHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « 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 b6be02cd1e49254fe576cfaf976a8179eb0065cf..aa396235ac507f7900034911b7d8c386df84d01a 100644
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
+++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
@@ -5,15 +5,13 @@
#ifndef AutoplayExperimentHelper_h
#define AutoplayExperimentHelper_h
-#include "core/page/Page.h"
+#include "core/page/PageVisibilityState.h"
#include "platform/Timer.h"
#include "platform/geometry/IntRect.h"
namespace blink {
+
class Document;
-class HTMLMediaElement;
-class EventListener;
-class LayoutObject;
class AutoplayExperimentTest;
// These values are used for a histogram. Do not reorder.
@@ -161,10 +159,6 @@ public:
// is not ExperimentOff).
bool isExperimentEnabled();
- // Clean up. For Oilpan, this means "early in HTMLMediaElement's dispose".
- // For non-Oilpan, just delete the object.
- void dispose();
-
// Remove the user gesture requirement, and record why. If there is no
// gesture requirement, then this does nothing.
void unlockUserGesture(AutoplayMetrics);
@@ -274,16 +268,13 @@ private:
// Process a timer for checking visibility.
void viewportTimerFired(Timer<AutoplayExperimentHelper>*);
- // Return our media element's document.
- Document& document() const;
-
- Client& client() const;
+ Client& client() const { return *m_client; }
bool isLockedPendingUserGesture() const;
inline bool enabled(Mode mode) const
{
- return ((int)m_mode) & ((int)mode);
+ return static_cast<int>(m_mode) & static_cast<int>(mode);
}
Mode fromString(const String& 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