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

Side by Side Diff: Source/core/html/AutoplayExperimentConfig.cpp

Issue 1179223002: Implement autoplay gesture override experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: linker errors on win/mac... Created 5 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/html/AutoplayExperimentConfig.h"
7
8 namespace blink {
9
10 AutoplayExperimentConfig::Mode AutoplayExperimentConfig::fromString(const String & mode)
11 {
12 AutoplayExperimentConfig::Mode value = AutoplayExperimentConfig::Mode::Off;
13 if (mode.contains("enabled"))
14 value |= AutoplayExperimentConfig::Mode::Enabled;
15 if (mode.contains("-ifviewport"))
16 value |= AutoplayExperimentConfig::Mode::IfViewport;
17 if (mode.contains("-ifmuted"))
18 value |= AutoplayExperimentConfig::Mode::IfMuted;
19 if (mode.contains("-ifmobile"))
20 value |= AutoplayExperimentConfig::Mode::IfMobile;
21 if (mode.contains("-playmuted"))
22 value |= AutoplayExperimentConfig::Mode::PlayMuted;
23
24 return value;
25 }
26
27 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698