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

Side by Side Diff: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h

Issue 1850903002: Enable user gesture requirement for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AutoplayExperimentHelper_h 5 #ifndef AutoplayExperimentHelper_h
6 #define AutoplayExperimentHelper_h 6 #define AutoplayExperimentHelper_h
7 7
8 #include "core/page/Page.h" 8 #include "core/page/Page.h"
9 #include "platform/Timer.h" 9 #include "platform/Timer.h"
10 #include "platform/geometry/IntRect.h" 10 #include "platform/geometry/IntRect.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void loadMethodCalled(); 144 void loadMethodCalled();
145 void mutedChanged(); 145 void mutedChanged();
146 void positionChanged(const IntRect&); 146 void positionChanged(const IntRect&);
147 void updatePositionNotificationRegistration(); 147 void updatePositionNotificationRegistration();
148 void recordSandboxFailure(); 148 void recordSandboxFailure();
149 void loadingStarted(); 149 void loadingStarted();
150 void playbackStarted(); 150 void playbackStarted();
151 void playbackStopped(); 151 void playbackStopped();
152 void initialPlayWithUserGesture(); 152 void initialPlayWithUserGesture();
153 153
154 // Returns true if and only if any experiment is enabled (i.e., |m_mode|
155 // is not ExperimentOff).
156 bool isExperimentEnabled();
157
154 // Clean up. For Oilpan, this means "early in HTMLMediaElement's dispose". 158 // Clean up. For Oilpan, this means "early in HTMLMediaElement's dispose".
155 // For non-Oilpan, just delete the object. 159 // For non-Oilpan, just delete the object.
156 void dispose(); 160 void dispose();
157 161
158 // Remove the user gesture requirement, and record why. If there is no 162 // Remove the user gesture requirement, and record why. If there is no
159 // gesture requirement, then this does nothing. 163 // gesture requirement, then this does nothing.
160 void removeUserGestureRequirement(AutoplayMetrics); 164 void removeUserGestureRequirement(AutoplayMetrics);
161 165
162 // Set the position to the current view's position, and 166 // Set the position to the current view's position, and
163 void triggerAutoplayViewportCheckForTesting(); 167 void triggerAutoplayViewportCheckForTesting();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 inline AutoplayExperimentHelper::Mode& operator|=(AutoplayExperimentHelper::Mode & a, 302 inline AutoplayExperimentHelper::Mode& operator|=(AutoplayExperimentHelper::Mode & a,
299 const AutoplayExperimentHelper::Mode& b) 303 const AutoplayExperimentHelper::Mode& b)
300 { 304 {
301 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static _cast<int>(b)); 305 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static _cast<int>(b));
302 return a; 306 return a;
303 } 307 }
304 308
305 } // namespace blink 309 } // namespace blink
306 310
307 #endif // AutoplayExperimentHelper_h 311 #endif // AutoplayExperimentHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698