Commit 6d73bac5 authored by Becca Hughes's avatar Becca Hughes Committed by Commit Bot

[Display Cutout] Add feature for media controls

Add a feature for media controls to recognise a gesture
and expand into the display cutout.

BUG=849790

Change-Id: Ice6de82f4fb94e366fca68338a55236fa1f05c8a
Reviewed-on: https://chromium-review.googlesource.com/1087710Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568142}
parent a8eae41b
......@@ -3932,6 +3932,13 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnableBlinkHeapIncrementalMarkingDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kBlinkHeapIncrementalMarking)},
#if defined(OS_ANDROID)
{"enable-media-controls-expand-gesture",
flag_descriptions::kEnableMediaControlsExpandGestureName,
flag_descriptions::kEnableMediaControlsExpandGestureDescription,
kOsAndroid, FEATURE_VALUE_TYPE(media::kMediaControlsExpandGesture)},
#endif
// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
// Histograms" in tools/metrics/histograms/README.md (run the
......
......@@ -2146,6 +2146,12 @@ const char kEnableDataReductionProxyMainMenuName[] =
const char kEnableDataReductionProxyMainMenuDescription[] =
"Enables the Data Saver menu item in the main menu";
const char kEnableMediaControlsExpandGestureName[] =
"Enable Media Controls Expand Gesture";
const char kEnableMediaControlsExpandGestureDescription[] =
"Enables a gesture to be used on the media controls to extend the video "
"into the Display Cutout area.";
const char kEnableOmniboxClipboardProviderName[] =
"Omnibox clipboard URL suggestions";
const char kEnableOmniboxClipboardProviderDescription[] =
......
......@@ -1308,6 +1308,9 @@ extern const char kEnableCustomFeedbackUiDescription[];
extern const char kEnableDataReductionProxyMainMenuName[];
extern const char kEnableDataReductionProxyMainMenuDescription[];
extern const char kEnableMediaControlsExpandGestureName[];
extern const char kEnableMediaControlsExpandGestureDescription[];
extern const char kEnableOmniboxClipboardProviderName[];
extern const char kEnableOmniboxClipboardProviderDescription[];
......
......@@ -333,6 +333,10 @@ const base::Feature kAutoplayIgnoreWebAudio{"AutoplayIgnoreWebAudio",
base::FEATURE_ENABLED_BY_DEFAULT};
#if defined(OS_ANDROID)
// Enable a gesture to make the media controls expaned into the display cutout.
const base::Feature kMediaControlsExpandGesture{
"MediaControlsExpandGesture", base::FEATURE_DISABLED_BY_DEFAULT};
// Lock the screen orientation when a video goes fullscreen.
const base::Feature kVideoFullscreenOrientationLock{
"VideoFullscreenOrientationLock", base::FEATURE_ENABLED_BY_DEFAULT};
......
......@@ -137,6 +137,7 @@ MEDIA_EXPORT extern const base::Feature kUseSurfaceLayerForVideo;
MEDIA_EXPORT extern const base::Feature kUseModernMediaControls;
#if defined(OS_ANDROID)
MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
MEDIA_EXPORT extern const base::Feature kVideoFullscreenOrientationLock;
MEDIA_EXPORT extern const base::Feature kVideoRotateToFullscreen;
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
......
......@@ -196,6 +196,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableExperimentalProductivityFeatures(
bool);
BLINK_PLATFORM_EXPORT static void EnableAutoplayIgnoresWebAudio(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool);
private:
WebRuntimeFeatures();
......
......@@ -540,4 +540,8 @@ void WebRuntimeFeatures::EnableAutoplayIgnoresWebAudio(bool enable) {
RuntimeEnabledFeatures::SetAutoplayIgnoresWebAudioEnabled(enable);
}
void WebRuntimeFeatures::EnableMediaControlsExpandGesture(bool enable) {
RuntimeEnabledFeatures::SetMediaControlsExpandGestureEnabled(enable);
}
} // namespace blink
......@@ -27315,6 +27315,7 @@ from previous Chrome versions.
<int value="-1136509631" label="ssl-interstitial-v1"/>
<int value="-1134307340" label="stop-loading-in-background:enabled"/>
<int value="-1132704128" label="AndroidPaymentAppsFilter:disabled"/>
<int value="-1128912963" label="MediaControlsExpandGesture:disabled"/>
<int value="-1127996427" label="enable-files-details-panel"/>
<int value="-1126217973" label="IdleTimeSpellChecking:disabled"/>
<int value="-1125840399" label="ViewsBrowserWindows:enabled"/>
......@@ -28006,6 +28007,7 @@ from previous Chrome versions.
<int value="468959230"
label="enable-non-validating-reload-on-refresh-content"/>
<int value="470011024" label="NonValidatingReloadOnNormalReload:enabled"/>
<int value="471969274" label="MediaControlsExpandGesture:enabled"/>
<int value="474743272" label="material-design-ink-drop"/>
<int value="475858648"
label="OverlayScrollbarFlashAfterAnyScrollUpdate:disabled"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment