Commit ab4c1e67 authored by Mounir Lamouri's avatar Mounir Lamouri Committed by Commit Bot

Remove flag to enable native controls for Chrome OS video player.

The flag is now enabled by default.

Bug: None
Change-Id: Iab273e0d44c0e511c9e2efd1dfaa37d9dafa5a9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2018089
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772026}
parent cad0f0ea
...@@ -4116,13 +4116,6 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -4116,13 +4116,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kArcCupsApi)}, FEATURE_VALUE_TYPE(features::kArcCupsApi)},
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
#if defined(OS_CHROMEOS)
{"enable-native-controls",
flag_descriptions::kEnableVideoPlayerNativeControlsName,
flag_descriptions::kEnableVideoPlayerNativeControlsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(chromeos::features::kVideoPlayerNativeControls)},
#endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
{"background-task-component-update", {"background-task-component-update",
flag_descriptions::kBackgroundTaskComponentUpdateName, flag_descriptions::kBackgroundTaskComponentUpdateName,
......
...@@ -32,9 +32,6 @@ FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() = ...@@ -32,9 +32,6 @@ FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() =
ExtensionFunction::ResponseAction FileManagerPrivateGetStringsFunction::Run() { ExtensionFunction::ResponseAction FileManagerPrivateGetStringsFunction::Run() {
auto dict = GetFileManagerStrings(); auto dict = GetFileManagerStrings();
dict->SetBoolean("VIDEO_PLAYER_NATIVE_CONTROLS_ENABLED",
base::FeatureList::IsEnabled(
chromeos::features::kVideoPlayerNativeControls));
dict->SetBoolean("HIDE_SPACE_INFO", dict->SetBoolean("HIDE_SPACE_INFO",
chromeos::DemoSession::IsDeviceInDemoMode()); chromeos::DemoSession::IsDeviceInDemoMode());
dict->SetBoolean("ARC_USB_STORAGE_UI_ENABLED", dict->SetBoolean("ARC_USB_STORAGE_UI_ENABLED",
......
...@@ -401,10 +401,6 @@ const base::Feature kUserActivityPrediction{"UserActivityPrediction", ...@@ -401,10 +401,6 @@ const base::Feature kUserActivityPrediction{"UserActivityPrediction",
const base::Feature kUseSearchClickForRightClick{ const base::Feature kUseSearchClickForRightClick{
"UseSearchClickForRightClick", base::FEATURE_DISABLED_BY_DEFAULT}; "UseSearchClickForRightClick", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable or disable native controls in video player on Chrome OS.
const base::Feature kVideoPlayerNativeControls{
"VideoPlayerNativeControls", base::FEATURE_ENABLED_BY_DEFAULT};
// Enable or disable bordered key for virtual keyboard on Chrome OS. // Enable or disable bordered key for virtual keyboard on Chrome OS.
const base::Feature kVirtualKeyboardBorderedKey{ const base::Feature kVirtualKeyboardBorderedKey{
"VirtualKeyboardBorderedKey", base::FEATURE_DISABLED_BY_DEFAULT}; "VirtualKeyboardBorderedKey", base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -177,8 +177,6 @@ extern const base::Feature kUserActivityPrediction; ...@@ -177,8 +177,6 @@ extern const base::Feature kUserActivityPrediction;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kUseSearchClickForRightClick; extern const base::Feature kUseSearchClickForRightClick;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kVideoPlayerNativeControls;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kVirtualKeyboardBorderedKey; extern const base::Feature kVirtualKeyboardBorderedKey;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kVirtualKeyboardFloatingResizable; extern const base::Feature kVirtualKeyboardFloatingResizable;
......
...@@ -2,12 +2,6 @@ ...@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
/**
* Boolean flag used to toggle native control
* @type {boolean}
*/
let useNativeControls = false;
/** /**
* @param {!HTMLElement} playerContainer Main container. * @param {!HTMLElement} playerContainer Main container.
* @param {!HTMLElement} videoContainer Container for the video element. * @param {!HTMLElement} videoContainer Container for the video element.
...@@ -320,17 +314,7 @@ function unload() { ...@@ -320,17 +314,7 @@ function unload() {
// Releases keep awake just in case (should be released on unloading video). // Releases keep awake just in case (should be released on unloading video).
chrome.power.releaseKeepAwake(); chrome.power.releaseKeepAwake();
if (useNativeControls) { nativePlayer.savePosition(true);
nativePlayer.savePosition(true);
return;
}
if (!player.controls || !player.controls.getMedia()) {
return;
}
player.controls.savePosition(true /* exiting */);
player.controls.cleanup();
} }
/** /**
...@@ -872,8 +856,6 @@ const nativePlayer = new NativeControlsVideoPlayer(); ...@@ -872,8 +856,6 @@ const nativePlayer = new NativeControlsVideoPlayer();
function initStrings(callback) { function initStrings(callback) {
chrome.fileManagerPrivate.getStrings(function(strings) { chrome.fileManagerPrivate.getStrings(function(strings) {
loadTimeData.data = strings; loadTimeData.data = strings;
useNativeControls =
loadTimeData.getBoolean('VIDEO_PLAYER_NATIVE_CONTROLS_ENABLED');
callback(); callback();
}.wrap(null)); }.wrap(null));
} }
...@@ -918,14 +900,8 @@ initPromise ...@@ -918,14 +900,8 @@ initPromise
metrics.recordOpenVideoPlayerAction(); metrics.recordOpenVideoPlayerAction();
metrics.recordNumberOfOpenedFiles(entries.length); metrics.recordNumberOfOpenedFiles(entries.length);
if (!useNativeControls) { nativePlayer.prepare(entries);
player.prepare(entries); nativePlayer.playFirstVideo();
// TODO(lucmult): |player| and |fulfill| are not used.
player.playFirstVideo(/*player, fulfill*/);
} else {
nativePlayer.prepare(entries);
nativePlayer.playFirstVideo();
}
}.wrap()); }.wrap());
}.wrap()); }.wrap());
}.wrap()); }.wrap());
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