Commit 58fb4d1d authored by Tim Song's avatar Tim Song Committed by Commit Bot

[EasyUnlock] Add option in chrome://settings to enable EasyUnlock for login.

Screenshot:
https://screenshot.googleplex.com/BV3uweR38fL.png

See mocks at:
https://docs.google.com/presentation/d/1GnKn5ca_KrM_BTQB-He9cCmzAQtwVF6JJJ6Lo6i4gqI/edit#slide=id.g4af27b4ff_35243

BUG=748288

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6f8f0b92164d546c1670816a76d3289d648955f1
Reviewed-on: https://chromium-review.googlesource.com/582342Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarGustavo Sacomoto <sacomoto@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491185}
parent a1bcacd2
...@@ -229,6 +229,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() { ...@@ -229,6 +229,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() {
settings_private::PrefType::PREF_TYPE_BOOLEAN; settings_private::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)[proximity_auth::prefs::kEasyUnlockProximityThreshold] = (*s_whitelist)[proximity_auth::prefs::kEasyUnlockProximityThreshold] =
settings_private::PrefType::PREF_TYPE_NUMBER; settings_private::PrefType::PREF_TYPE_NUMBER;
(*s_whitelist)[proximity_auth::prefs::kProximityAuthIsChromeOSLoginEnabled] =
settings_private::PrefType::PREF_TYPE_BOOLEAN;
// Accessibility. // Accessibility.
(*s_whitelist)[::prefs::kAccessibilitySpokenFeedbackEnabled] = (*s_whitelist)[::prefs::kAccessibilitySpokenFeedbackEnabled] =
......
...@@ -49,9 +49,17 @@ ...@@ -49,9 +49,17 @@
margin: auto; margin: auto;
} }
.easy-unlock-nested-settings { #easyUnlockSettingsCollapsable {
@apply(--settings-list-frame-padding); @apply(--settings-list-frame-padding);
} }
.no-padding {
padding: 0;
}
.underbar {
border-bottom: var(--settings-separator-line);
}
</style> </style>
<div> <div>
...@@ -155,8 +163,16 @@ ...@@ -155,8 +163,16 @@
</paper-button> </paper-button>
</template> </template>
</div> </div>
<iron-collapse opened="[[easyUnlockEnabled_]]"> <iron-collapse opened="[[easyUnlockEnabled_]]"
<div class="settings-box continuation easy-unlock-nested-settings"> id="easyUnlockSettingsCollapsable">
<div class="settings-box continuation no-padding underbar">
<settings-toggle-button
class="start"
pref="{{prefs.proximity_auth.is_chromeos_login_enabled}}"
label="$i18n{easyUnlockAllowSignInLabel}">
</settings-toggle-button>
</div>
<div class="settings-box continuation no-padding">
<div class="start"> <div class="start">
$i18n{easyUnlockProximityThresholdLabel} $i18n{easyUnlockProximityThresholdLabel}
</div> </div>
......
...@@ -903,6 +903,8 @@ void AddEasyUnlockStrings(content::WebUIDataSource* html_source) { ...@@ -903,6 +903,8 @@ void AddEasyUnlockStrings(content::WebUIDataSource* html_source) {
{"easyUnlockTurnOffErrorMessage", {"easyUnlockTurnOffErrorMessage",
IDS_SETTINGS_EASY_UNLOCK_TURN_OFF_ERROR_MESSAGE}, IDS_SETTINGS_EASY_UNLOCK_TURN_OFF_ERROR_MESSAGE},
{"easyUnlockTurnOffRetryButton", IDS_SETTINGS_EASY_UNLOCK_TURN_OFF_RETRY}, {"easyUnlockTurnOffRetryButton", IDS_SETTINGS_EASY_UNLOCK_TURN_OFF_RETRY},
{"easyUnlockAllowSignInLabel",
IDS_SETTINGS_EASY_UNLOCK_ALLOW_SIGN_IN_LABEL},
{"easyUnlockProximityThresholdLabel", {"easyUnlockProximityThresholdLabel",
IDS_SETTINGS_EASY_UNLOCK_PROXIMITY_THRESHOLD_LABEL}, IDS_SETTINGS_EASY_UNLOCK_PROXIMITY_THRESHOLD_LABEL},
{"easyUnlockProximityThresholdVeryClose", {"easyUnlockProximityThresholdVeryClose",
......
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