Commit 696c82aa authored by Jing Wang's avatar Jing Wang Committed by Commit Bot

Add a flag for IME options page in ChromeOS settings.

Implemented a UI change behind the flag:
UI with flag disabled: https://screenshot.googleplex.com/osdAbRsrOdw
UI with flag enabled: https://screenshot.googleplex.com/k9waaRkjG4x

Test: tested with Chrome on Linux
Bug: 1086786
Change-Id: Id3b35306289715e8761e874a6b0fcdfed12205ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216139Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Jing Wang <jiwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773047}
parent 24b0ef37
......@@ -138,6 +138,7 @@
margin-inline-start: var(--settings-controlled-by-spacing);
}
.internal-wrapper,
.external-wrapper {
display: flex;
}
......@@ -215,11 +216,18 @@
$i18n{inputMethodEnabled}
</div>
</div>
<div class="external-wrapper" hidden="[[!item.hasOptionsPage]]">
<div class="separator"></div>
<cr-icon-button class="icon-external"
on-click="onInputMethodOptionsTap_"></cr-icon-button>
</div>
<template is="dom-if" if="[[imeOptionsInSettings_]]">
<div class="internal-wrapper" hidden="[[!item.hasOptionsPage]]">
<cr-icon-button class="subpage-arrow"></cr-icon-button>
</div>
</template>
<template is="dom-if" if="[[!imeOptionsInSettings_]]">
<div class="external-wrapper" hidden="[[!item.hasOptionsPage]]">
<div class="separator"></div>
<cr-icon-button class="icon-external"
on-click="onInputMethodOptionsTap_"></cr-icon-button>
</div>
</template>
</div>
</template>
<cr-link-row class="hr list-item" id="manageInputMethods"
......
......@@ -66,6 +66,14 @@ cr.define('settings', function() {
return loadTimeData.getBoolean('isGuest');
},
},
/** @private */
imeOptionsInSettings_: {
type: Boolean,
value() {
return loadTimeData.getBoolean('imeOptionsInSettings');
},
}
},
/** @private {boolean} */
......
......@@ -154,6 +154,9 @@ void LanguagesSection::AddLoadTimeData(content::WebUIDataSource* html_source) {
html_source->AddString(
"languagesLearnMoreURL",
base::ASCIIToUTF16(chrome::kLanguageSettingsLearnMoreUrl));
html_source->AddBoolean("imeOptionsInSettings",
base::FeatureList::IsEnabled(
::chromeos::features::kImeOptionsInSettings));
}
void LanguagesSection::AddHandlers(content::WebUI* web_ui) {
......
......@@ -79,6 +79,11 @@ const base::Feature kBluetoothNextHandsfreeProfile{
const base::Feature kCameraSystemWebApp{"CameraSystemWebApp",
base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, options page for each input method will be opened in ChromeOS
// settings. Otherwise it will be opened in a new web page in Chrome browser.
const base::Feature kImeOptionsInSettings{"ImeOptionsInSettings",
base::FEATURE_DISABLED_BY_DEFAULT};
// Enables or disables Crostini port forwarding.
const base::Feature kCrostiniPortForwarding{"CrostiniPortForwarding",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -107,6 +107,8 @@ extern const base::Feature kImeInputLogicFst;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kImeInputLogicMozc;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kImeOptionsInSettings;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kVirtualKeyboardFloatingDefault;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kInstantTethering;
......
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