Revert "Unified: Hide inactive top buttons instead of dim."

This reverts commit f82109c5b3122d5f88a654e3ba3e5b128e59e48c.

Reason for revert: Crash https://crbug.com/865198

Original change's description:
> Unified: Hide inactive top buttons instead of dim.
>
> On the login screen, we made the settings button and the lock button
> look dim.
>
> According to UX, we should just make them invisible.
>
> TEST=manual
> BUG=864233
>
> Change-Id: I90fc6853b2735a73d426dbb05b2f693be7ff2ce6
> Reviewed-on: https://chromium-review.googlesource.com/1139847
> Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
> Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#575970}

TBR=yoshiki@chromium.org,tetsui@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 864233,865198
Change-Id: I4f3d30c529a5ecc5e68c69cb833bfd6a4c8e2c6d
Reviewed-on: https://chromium-review.googlesource.com/1144860
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576800}
diff --git a/ash/system/unified/top_shortcuts_view.cc b/ash/system/unified/top_shortcuts_view.cc
index fc684a4..6125f38 100644
--- a/ash/system/unified/top_shortcuts_view.cc
+++ b/ash/system/unified/top_shortcuts_view.cc
@@ -154,13 +154,13 @@
 
   lock_button_ = new TopShortcutButton(this, kUnifiedMenuLockIcon,
                                        IDS_ASH_STATUS_TRAY_LOCK);
-  lock_button_->SetVisible(can_show_web_ui &&
+  lock_button_->SetEnabled(can_show_web_ui &&
                            Shell::Get()->session_controller()->CanLockScreen());
   container_->AddChildView(lock_button_);
 
   settings_button_ = new TopShortcutButton(this, kUnifiedMenuSettingsIcon,
                                            IDS_ASH_STATUS_TRAY_SETTINGS);
-  settings_button_->SetVisible(can_show_web_ui);
+  settings_button_->SetEnabled(can_show_web_ui);
   container_->AddChildView(settings_button_);
 
   bool reboot = Shell::Get()->shutdown_controller()->reboot_on_shutdown();
diff --git a/ash/system/unified/top_shortcuts_view_unittest.cc b/ash/system/unified/top_shortcuts_view_unittest.cc
index a7540bf..523c838 100644
--- a/ash/system/unified/top_shortcuts_view_unittest.cc
+++ b/ash/system/unified/top_shortcuts_view_unittest.cc
@@ -16,7 +16,7 @@
 
 namespace ash {
 
-// Tests manually control their session visible.
+// Tests manually control their session state.
 class TopShortcutsViewTest : public NoSessionAshTestBase {
  public:
   TopShortcutsViewTest() = default;
@@ -74,10 +74,10 @@
   SetUpView();
   EXPECT_EQ(nullptr, GetUserAvatar());
   EXPECT_FALSE(GetSignOutButton()->visible());
-  EXPECT_FALSE(GetLockButton()->visible());
-  EXPECT_FALSE(GetSettingsButton()->visible());
-  EXPECT_TRUE(GetPowerButton()->visible());
-  EXPECT_TRUE(GetCollapseButton()->visible());
+  EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state());
+  EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetCollapseButton()->state());
 }
 
 // All buttons are enabled after login.
@@ -86,10 +86,10 @@
   SetUpView();
   EXPECT_NE(nullptr, GetUserAvatar());
   EXPECT_TRUE(GetSignOutButton()->visible());
-  EXPECT_TRUE(GetLockButton()->visible());
-  EXPECT_TRUE(GetSettingsButton()->visible());
-  EXPECT_TRUE(GetPowerButton()->visible());
-  EXPECT_TRUE(GetCollapseButton()->visible());
+  EXPECT_EQ(Button::STATE_NORMAL, GetLockButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetSettingsButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetCollapseButton()->state());
 }
 
 // Settings buttons are disabled at the lock screen.
@@ -98,10 +98,10 @@
   SetUpView();
   EXPECT_NE(nullptr, GetUserAvatar());
   EXPECT_TRUE(GetSignOutButton()->visible());
-  EXPECT_FALSE(GetLockButton()->visible());
-  EXPECT_FALSE(GetSettingsButton()->visible());
-  EXPECT_TRUE(GetPowerButton()->visible());
-  EXPECT_TRUE(GetCollapseButton()->visible());
+  EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state());
+  EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetCollapseButton()->state());
 }
 
 // Settings buttons are disabled when adding a second multiprofile user.
@@ -111,10 +111,10 @@
   SetUpView();
   EXPECT_NE(nullptr, GetUserAvatar());
   EXPECT_TRUE(GetSignOutButton()->visible());
-  EXPECT_FALSE(GetLockButton()->visible());
-  EXPECT_FALSE(GetSettingsButton()->visible());
-  EXPECT_TRUE(GetPowerButton()->visible());
-  EXPECT_TRUE(GetCollapseButton()->visible());
+  EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state());
+  EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetCollapseButton()->state());
 }
 
 // Settings buttons are disabled when adding a supervised user.
@@ -127,10 +127,10 @@
   SetUpView();
   EXPECT_EQ(nullptr, GetUserAvatar());
   EXPECT_FALSE(GetSignOutButton()->visible());
-  EXPECT_FALSE(GetLockButton()->visible());
-  EXPECT_FALSE(GetSettingsButton()->visible());
-  EXPECT_TRUE(GetPowerButton()->visible());
-  EXPECT_TRUE(GetCollapseButton()->visible());
+  EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state());
+  EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state());
+  EXPECT_EQ(Button::STATE_NORMAL, GetCollapseButton()->state());
 }
 
 }  // namespace ash