Commit 981e9e98 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

Remove show-webui-login and show-webui-lock flags

Also removed "ViewsLogin" feature making it enabled

Fixed: 987587
Cq-Depend: chromium:2134259, chromium:2122927
Change-Id: I99e50481998e7a5a7a3ff1402ffd96d6bf286c80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135693Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757184}
parent c5acc4fc
......@@ -7,7 +7,6 @@
#include "ash/lock_screen_action/lock_screen_action_background_controller_impl.h"
#include "ash/lock_screen_action/lock_screen_action_background_controller_stub.h"
#include "ash/lock_screen_action/lock_screen_action_background_observer.h"
#include "ash/public/cpp/ash_switches.h"
#include "base/callback.h"
namespace ash {
......@@ -24,11 +23,6 @@ std::unique_ptr<LockScreenActionBackgroundController>
LockScreenActionBackgroundController::Create() {
if (g_testing_factory_callback)
return g_testing_factory_callback->Run();
// Web UI based lock screen implements its own background - use the stub
// lock action background controller implementation unless md-based lock UI
// is used.
if (!switches::IsUsingViewsLock())
return std::make_unique<LockScreenActionBackgroundControllerStub>();
return std::make_unique<LockScreenActionBackgroundControllerImpl>();
}
......
......@@ -337,7 +337,7 @@ void LoginScreenController::FocusLoginShelf(bool reverse) {
Shelf* shelf = Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow());
// Tell the focus direction to the status area or the shelf so they can focus
// the correct child view.
if (reverse || !ShelfWidget::IsUsingViewsShelf()) {
if (reverse) {
if (!Shell::GetPrimaryRootWindowController()->IsSystemTrayVisible())
return;
shelf->GetStatusAreaWidget()
......
......@@ -93,8 +93,6 @@ const base::Feature kTrilinearFiltering{"TrilinearFiltering",
const base::Feature kUnlockWithExternalBinary{
"UnlockWithExternalBinary", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kViewsLogin{"ViewsLogin", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kUseBluetoothSystemInAsh{"UseBluetoothSystemInAsh",
base::FEATURE_DISABLED_BY_DEFAULT};
......@@ -182,15 +180,6 @@ bool IsTrilinearFilteringEnabled() {
return use_trilinear_filtering;
}
bool IsViewsLoginEnabled() {
// Always show webui login if --show-webui-login is present, which is passed
// by session manager for automatic recovery. Otherwise, only show views
// login if the feature is enabled.
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
ash::switches::kShowWebUiLogin) &&
base::FeatureList::IsEnabled(kViewsLogin);
}
bool IsSupervisedUserDeprecationNoticeEnabled() {
return base::FeatureList::IsEnabled(kSupervisedUserDeprecationNotice);
}
......
......@@ -114,9 +114,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kTrilinearFiltering;
// Enables running an external binary which provides lock screen authentication.
ASH_PUBLIC_EXPORT extern const base::Feature kUnlockWithExternalBinary;
// Enables views login.
ASH_PUBLIC_EXPORT extern const base::Feature kViewsLogin;
// Enables using the BluetoothSystem Mojo interface for Bluetooth operations.
ASH_PUBLIC_EXPORT extern const base::Feature kUseBluetoothSystemInAsh;
......@@ -187,8 +184,6 @@ ASH_PUBLIC_EXPORT bool IsSeparateNetworkIconsEnabled();
ASH_PUBLIC_EXPORT bool IsTrilinearFilteringEnabled();
ASH_PUBLIC_EXPORT bool IsViewsLoginEnabled();
ASH_PUBLIC_EXPORT bool IsSupervisedUserDeprecationNoticeEnabled();
ASH_PUBLIC_EXPORT bool IsSwapSideVolumeButtonsForOrientationEnabled();
......
......@@ -134,13 +134,6 @@ const char kHasInternalStylus[] = "has-internal-stylus";
// option "Show taps".
const char kShowTaps[] = "show-taps";
// If true, the webui lock screen will be shown. This is deprecated and will be
// removed in the future.
const char kShowWebUiLock[] = "show-webui-lock";
// Forces the webui login implementation.
const char kShowWebUiLogin[] = "show-webui-login";
// Chromebases' touchscreens can be used to wake from suspend, unlike the
// touchscreens on other Chrome OS devices. If set, the touchscreen is kept
// enabled while the screen is off so that it can be used to turn the screen
......@@ -179,10 +172,5 @@ bool IsUsingShelfAutoDim() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableDimShelf);
}
// Returns true if the device will NOT show the webui lock screen.
bool IsUsingViewsLock() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(kShowWebUiLock);
}
} // namespace switches
} // namespace ash
......@@ -57,15 +57,12 @@ ASH_PUBLIC_EXPORT extern const char kEnableDimShelf[];
ASH_PUBLIC_EXPORT extern const char kForceTabletPowerButton[];
ASH_PUBLIC_EXPORT extern const char kHasInternalStylus[];
ASH_PUBLIC_EXPORT extern const char kShowTaps[];
ASH_PUBLIC_EXPORT extern const char kShowWebUiLock[];
ASH_PUBLIC_EXPORT extern const char kShowWebUiLogin[];
ASH_PUBLIC_EXPORT extern const char kSuppressMessageCenterPopups[];
ASH_PUBLIC_EXPORT extern const char kTouchscreenUsableWhileScreenOff[];
ASH_PUBLIC_EXPORT base::Optional<base::TimeDelta> ContextualNudgesInterval();
ASH_PUBLIC_EXPORT bool ContextualNudgesResetShownCount();
ASH_PUBLIC_EXPORT bool IsUsingShelfAutoDim();
ASH_PUBLIC_EXPORT bool IsUsingViewsLock();
} // namespace switches
} // namespace ash
......
......@@ -246,24 +246,6 @@ ShelfWidget::DelegateView::DelegateView(ShelfWidget* shelf_widget)
ShelfWidget::DelegateView::~DelegateView() = default;
// static
bool ShelfWidget::IsUsingViewsShelf() {
switch (Shell::Get()->session_controller()->GetSessionState()) {
case session_manager::SessionState::ACTIVE:
return true;
// See https://crbug.com/798869.
case session_manager::SessionState::OOBE:
case session_manager::SessionState::LOGIN_PRIMARY:
return true;
case session_manager::SessionState::LOCKED:
case session_manager::SessionState::LOGIN_SECONDARY:
return switches::IsUsingViewsLock();
case session_manager::SessionState::UNKNOWN:
case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE:
return features::IsViewsLoginEnabled();
}
}
void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) {
layer->Add(opaque_background());
ReorderLayers();
......@@ -436,9 +418,6 @@ void ShelfWidget::DelegateView::OnBoundsChanged(const gfx::Rect& old_bounds) {
}
views::View* ShelfWidget::DelegateView::GetDefaultFocusableChild() {
if (!IsUsingViewsShelf())
return GetFirstFocusableChild();
if (login_shelf_view_->GetVisible()) {
return FindFirstOrLastFocusableChild(login_shelf_view_,
default_last_focusable_child_);
......@@ -925,24 +904,9 @@ void ShelfWidget::OnSessionStateChanged(session_manager::SessionState state) {
// * when views based shelf is disabled
// * in UNKNOWN state - it might be called before shelf was initialized
// * on secondary screens in states other than ACTIVE
//
// TODO(alemate): better handle show-hide for some UI screens:
// https://crbug.com/935842
// https://crbug.com/935844
// https://crbug.com/935846
// https://crbug.com/935847
// https://crbug.com/935852
// https://crbug.com/935853
// https://crbug.com/935856
// https://crbug.com/935857
// https://crbug.com/935858
// https://crbug.com/935860
// https://crbug.com/935861
// https://crbug.com/935863
bool using_views_shelf = IsUsingViewsShelf();
bool unknown_state = state == session_manager::SessionState::UNKNOWN;
bool hide_on_secondary_screen = shelf_->ShouldHideOnSecondaryDisplay(state);
if (!using_views_shelf || unknown_state || hide_on_secondary_screen) {
if (unknown_state || hide_on_secondary_screen) {
HideIfShown();
} else {
bool show_hotseat = (state == session_manager::SessionState::ACTIVE);
......
......@@ -58,9 +58,6 @@ class ASH_EXPORT ShelfWidget : public AccessibilityObserver,
// Clean up prior to deletion.
void Shutdown();
// Returns true if the views-based shelf is being shown.
static bool IsUsingViewsShelf();
void OnTabletModeChanged();
ShelfBackgroundType GetBackgroundType() const;
......
......@@ -7,7 +7,6 @@
#include "ash/keyboard/ui/keyboard_ui_controller.h"
#include "ash/keyboard/ui/keyboard_util.h"
#include "ash/keyboard/ui/test/keyboard_test_util.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/keyboard/keyboard_switches.h"
#include "ash/public/cpp/shelf_config.h"
......@@ -29,8 +28,6 @@
#include "ash/wm/window_util.h"
#include "base/bind_helpers.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "chromeos/constants/chromeos_features.h"
#include "components/session_manager/session_manager_types.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
......@@ -839,33 +836,7 @@ class ShelfWidgetViewsVisibilityTest : public AshTestBase {
DISALLOW_COPY_AND_ASSIGN(ShelfWidgetViewsVisibilityTest);
};
TEST_F(ShelfWidgetViewsVisibilityTest, LoginWebUiLockViews) {
// Enable web UI login.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kShowWebUiLogin);
ASSERT_NO_FATAL_FAILURE(InitShelfVariables());
// Both shelf views are hidden when session state hasn't been initialized.
ExpectVisible(SessionState::UNKNOWN, kNone /*primary*/, kNone /*secondary*/);
// Web UI login is used, so views shelf is not visible during login.
ExpectVisible(SessionState::OOBE, kLoginShelf, kNone);
ExpectVisible(SessionState::LOGIN_PRIMARY, kLoginShelf, kNone);
SimulateUserLogin("user1@test.com");
ExpectVisible(SessionState::LOGGED_IN_NOT_ACTIVE, kNone, kNone);
ExpectVisible(SessionState::ACTIVE, kShelf, kShelf);
ExpectVisible(SessionState::LOCKED, kLoginShelf, kNone);
ExpectVisible(SessionState::ACTIVE, kShelf, kShelf);
ExpectVisible(SessionState::LOGIN_SECONDARY, kLoginShelf, kNone);
ExpectVisible(SessionState::ACTIVE, kShelf, kShelf);
}
TEST_F(ShelfWidgetViewsVisibilityTest, LoginViewsLockViews) {
// Enable views login. Views lock enabled by default.
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(ash::features::kViewsLogin);
ASSERT_NO_FATAL_FAILURE(InitShelfVariables());
ExpectVisible(SessionState::UNKNOWN, kNone /*primary*/, kNone /*secondary*/);
......
......@@ -96,10 +96,6 @@ void StatusAreaWidgetDelegate::SetFocusCyclerForTesting(
}
bool StatusAreaWidgetDelegate::ShouldFocusOut(bool reverse) {
// Never bring the focus out if it's not a views-based shelf as it is visually
// not on par with the status widget.
if (!ShelfWidget::IsUsingViewsShelf())
return false;
views::View* focused_view = GetFocusManager()->GetFocusedView();
return (reverse && focused_view == GetFirstFocusableChild()) ||
(!reverse && focused_view == GetLastFocusableChild());
......
......@@ -100,9 +100,6 @@ class StatusAreaWidgetFocusTest : public AshTestBase {
// AshTestBase:
void SetUp() override {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kShowWebUiLock);
AshTestBase::SetUp();
test_observer_.reset(new SystemTrayFocusTestObserver);
Shell::Get()->system_tray_notifier()->AddSystemTrayFocusObserver(
......
......@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/login/app_launch_controller.h"
#include "ash/public/cpp/ash_features.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
......@@ -27,7 +26,6 @@
#include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
#include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/lifetime/application_lifetime.h"
......@@ -167,18 +165,7 @@ void AppLaunchController::StartAppLaunch(bool is_auto_launch) {
RecordKioskLaunchUMA(is_auto_launch);
// Ensure WebUILoginView is enabled so that bailout shortcut key works.
if (ash::features::IsViewsLoginEnabled()) {
host_->GetLoginDisplay()->SetUIEnabled(true);
login_screen_visible_ = true;
} else {
host_->GetWebUILoginView()->SetUIEnabled(true);
login_screen_visible_ = host_->GetWebUILoginView()->webui_visible();
if (!login_screen_visible_) {
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
content::NotificationService::AllSources());
}
}
host_->GetLoginDisplay()->SetUIEnabled(true);
launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue();
......@@ -271,17 +258,6 @@ void AppLaunchController::OnOwnerSigninSuccess() {
signin_screen_.reset();
}
void AppLaunchController::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, type);
DCHECK(!login_screen_visible_);
login_screen_visible_ = true;
launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue();
if (launcher_ready_)
OnReadyToLaunch();
}
void AppLaunchController::OnCancelAppLaunch() {
if (KioskAppManager::Get()->GetDisableBailoutShortcut())
return;
......@@ -519,9 +495,6 @@ void AppLaunchController::OnReadyToLaunch() {
if (network_config_requested_)
return;
if (!login_screen_visible_)
return;
if (splash_wait_timer_.IsRunning())
return;
......
......@@ -18,8 +18,6 @@
#include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
#include "chrome/browser/chromeos/login/app_launch_signin_screen.h"
#include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
class Profile;
......@@ -35,8 +33,7 @@ class OobeUI;
class AppLaunchController : public KioskProfileLoader::Delegate,
public StartupAppLauncher::Delegate,
public AppLaunchSigninScreen::Delegate,
public AppLaunchSplashScreenView::Delegate,
public content::NotificationObserver {
public AppLaunchSplashScreenView::Delegate {
public:
typedef base::Callback<bool()> ReturnBoolCallback;
......@@ -116,11 +113,6 @@ class AppLaunchController : public KioskProfileLoader::Delegate,
// AppLaunchSigninScreen::Delegate overrides:
void OnOwnerSigninSuccess() override;
// content::NotificationObserver overrides:
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
Profile* profile_ = nullptr;
const std::string app_id_;
const bool diagnostic_mode_;
......@@ -132,8 +124,6 @@ class AppLaunchController : public KioskProfileLoader::Delegate,
std::unique_ptr<AppLaunchSigninScreen> signin_screen_;
std::unique_ptr<AppWindowWatcher> app_window_watcher_;
content::NotificationRegistrar registrar_;
bool login_screen_visible_ = false;
bool launcher_ready_ = false;
bool cleaned_up_ = false;
......
......@@ -171,8 +171,6 @@ void DeriveCommandLine(const GURL& start_url,
ash::switches::kAuraLegacyPowerButton,
ash::switches::kEnableDimShelf,
ash::switches::kShowTaps,
ash::switches::kShowWebUiLock,
ash::switches::kShowWebUiLogin,
chromeos::switches::kDefaultWallpaperLarge,
chromeos::switches::kDefaultWallpaperSmall,
chromeos::switches::kGuestWallpaperLarge,
......
......@@ -7,7 +7,6 @@
#include <string>
#include <utility>
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/login_screen_test_api.h"
#include "base/base64.h"
#include "base/bind.h"
......@@ -1716,7 +1715,6 @@ IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLInterstitialNext) {
// pages is controlled by the kLoginVideoCaptureAllowedUrls pref rather than the
// underlying user content setting.
IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, TestLoginMediaPermission) {
EXPECT_TRUE(ash::features::IsViewsLoginEnabled());
fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
const GURL url1("https://google.com");
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "ash/accessibility/focus_ring_controller.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/locale_update_controller.h"
#include "ash/public/cpp/login_screen.h"
#include "ash/public/cpp/login_screen_model.h"
......@@ -197,8 +196,7 @@ void ShowLoginWizardFinish(
if (chromeos::LoginDisplayHost::default_host()) {
// Tests may have already allocated an instance for us to use.
display_host = chromeos::LoginDisplayHost::default_host();
} else if (ash::features::IsViewsLoginEnabled() &&
ShouldShowSigninScreen(first_screen)) {
} else if (ShouldShowSigninScreen(first_screen)) {
display_host = new chromeos::LoginDisplayHostMojo();
} else {
display_host = new chromeos::LoginDisplayHostWebUI();
......
......@@ -6,7 +6,6 @@
#include <memory>
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/login_screen.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
......@@ -1388,20 +1387,6 @@ void GaiaScreenHandler::ShowGaiaScreenIfReady() {
gaia_silent_load_ = false;
}
// Views-based login may reach here while pre-loading the Gaia screen, so
// update the wallpaper in |LoginDisplayHostMojo::UpdateGaiaDialogVisibility|
// instead, which controls the actual visibility of the Gaia screen.
if (!ash::features::IsViewsLoginEnabled()) {
// Note that LoadAuthExtension clears |populated_email_|.
if (populated_email_.empty()) {
LoginDisplayHost::default_host()->LoadSigninWallpaper();
} else {
LoginDisplayHost::default_host()->LoadWallpaper(
user_manager::known_user::GetAccountId(
populated_email_, std::string() /* id */, AccountType::UNKNOWN));
}
}
input_method::InputMethodManager* imm =
input_method::InputMethodManager::Get();
......
......@@ -10,8 +10,6 @@
#include <string>
#include <utility>
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/network_config_service.h"
#include "ash/public/cpp/resources/grit/ash_public_unscaled_resources.h"
#include "base/bind.h"
......@@ -601,10 +599,6 @@ void OobeUI::GetLocalizedStrings(base::DictionaryValue* localized_strings) {
localized_strings->SetString("highlightStrength",
keyboard_driven_oobe ? "strong" : "normal");
localized_strings->SetString(
"showViewsLock", ash::switches::IsUsingViewsLock() ? "on" : "off");
localized_strings->SetString(
"showViewsLogin", ash::features::IsViewsLoginEnabled() ? "on" : "off");
localized_strings->SetBoolean(
"changePictureVideoModeEnabled",
base::FeatureList::IsEnabled(features::kChangePictureVideoMode));
......
......@@ -265,9 +265,7 @@ cr.define('cr.ui.login', function() {
* @return {boolean}
*/
get showingViewsLogin() {
return loadTimeData.valueExists('showViewsLogin') &&
loadTimeData.getString('showViewsLogin') == 'on' &&
(this.displayType_ == DISPLAY_TYPE.GAIA_SIGNIN);
return this.displayType_ == DISPLAY_TYPE.GAIA_SIGNIN;
},
/**
......
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