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

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: rebased. 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 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void loadMethodCalled(); 147 void loadMethodCalled();
148 void mutedChanged(); 148 void mutedChanged();
149 void positionChanged(const IntRect&); 149 void positionChanged(const IntRect&);
150 void updatePositionNotificationRegistration(); 150 void updatePositionNotificationRegistration();
151 void recordSandboxFailure(); 151 void recordSandboxFailure();
152 void loadingStarted(); 152 void loadingStarted();
153 void playbackStarted(); 153 void playbackStarted();
154 void playbackStopped(); 154 void playbackStopped();
155 void initialPlayWithUserGesture(); 155 void initialPlayWithUserGesture();
156 156
157 // Returns true if and only if any experiment is enabled (i.e., |m_mode|
158 // is not ExperimentOff).
159 bool isExperimentEnabled();
160
157 // Clean up. For Oilpan, this means "early in HTMLMediaElement's dispose". 161 // Clean up. For Oilpan, this means "early in HTMLMediaElement's dispose".
158 // For non-Oilpan, just delete the object. 162 // For non-Oilpan, just delete the object.
159 void dispose(); 163 void dispose();
160 164
161 // Remove the user gesture requirement, and record why. If there is no 165 // Remove the user gesture requirement, and record why. If there is no
162 // gesture requirement, then this does nothing. 166 // gesture requirement, then this does nothing.
163 void removeUserGestureRequirement(AutoplayMetrics); 167 void removeUserGestureRequirement(AutoplayMetrics);
164 168
165 // Set the position to the current view's position, and 169 // Set the position to the current view's position, and
166 void triggerAutoplayViewportCheckForTesting(); 170 void triggerAutoplayViewportCheckForTesting();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 inline AutoplayExperimentHelper::Mode& operator|=(AutoplayExperimentHelper::Mode & a, 315 inline AutoplayExperimentHelper::Mode& operator|=(AutoplayExperimentHelper::Mode & a,
312 const AutoplayExperimentHelper::Mode& b) 316 const AutoplayExperimentHelper::Mode& b)
313 { 317 {
314 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static _cast<int>(b)); 318 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static _cast<int>(b));
315 return a; 319 return a;
316 } 320 }
317 321
318 } // namespace blink 322 } // namespace blink
319 323
320 #endif // AutoplayExperimentHelper_h 324 #endif // AutoplayExperimentHelper_h
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698