Commit 205b72ba authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

webauthn: hide back button from caBLE sheet on Windows.

When the native Windows API is in use, there's no point in being able
to go "back" to the transport selection sheet because the only entry
will be "Your phone". The native API can be triggered by the drop-down
list.

BUG=1002262

Change-Id: I4791542c9e18f5214deee211dc6afcac22cacdc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032012
Commit-Queue: Adam Langley <agl@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Auto-Submit: Adam Langley <agl@chromium.org>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#737111}
parent f955982f
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/url_formatter/elide_url.h" #include "components/url_formatter/elide_url.h"
#include "device/fido/authenticator_get_assertion_response.h" #include "device/fido/authenticator_get_assertion_response.h"
#include "device/fido/features.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/font_list.h" #include "ui/gfx/font_list.h"
#include "ui/gfx/text_utils.h" #include "ui/gfx/text_utils.h"
...@@ -742,6 +743,14 @@ AuthenticatorPaaskSheetModel::AuthenticatorPaaskSheetModel( ...@@ -742,6 +743,14 @@ AuthenticatorPaaskSheetModel::AuthenticatorPaaskSheetModel(
AuthenticatorPaaskSheetModel::~AuthenticatorPaaskSheetModel() = default; AuthenticatorPaaskSheetModel::~AuthenticatorPaaskSheetModel() = default;
bool AuthenticatorPaaskSheetModel::IsBackButtonVisible() const {
#if defined(OS_WIN)
return !base::FeatureList::IsEnabled(device::kWebAuthUseNativeWinApi);
#else
return true;
#endif
}
bool AuthenticatorPaaskSheetModel::IsActivityIndicatorVisible() const { bool AuthenticatorPaaskSheetModel::IsActivityIndicatorVisible() const {
return true; return true;
} }
......
...@@ -354,6 +354,7 @@ class AuthenticatorPaaskSheetModel : public AuthenticatorSheetModelBase { ...@@ -354,6 +354,7 @@ class AuthenticatorPaaskSheetModel : public AuthenticatorSheetModelBase {
private: private:
// AuthenticatorSheetModelBase: // AuthenticatorSheetModelBase:
bool IsBackButtonVisible() const override;
bool IsActivityIndicatorVisible() const override; bool IsActivityIndicatorVisible() const override;
const gfx::VectorIcon& GetStepIllustration( const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override; ImageColorScheme color_scheme) const override;
......
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