Commit 36f79302 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Don't set focus behavior in ManagePasswordsIconViews constructor.

Followup to https://chromium-review.googlesource.com/c/chromium/src/+/1532997 .

When these SetFocusBehavior() calls were added, they were necessary on Mac, and
I think ACCESSIBLE_ONLY didn't exist.  Later LocationIconView::Init() was added
and overrode all this, but the (effectively dead) code here wasn't removed.
When I removed Init() early this year this code became live again, but isn't
desirable any longer.

Also does a few other trivial cleanups.

Bug: 1027110
Change-Id: I2a55c6d47db0fcb71160d4dda2e61eec82386b3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930327
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718314}
parent 90128cb5
......@@ -19,19 +19,11 @@ const char ManagePasswordsIconViews::kClassName[] = "ManagePasswordsIconViews";
ManagePasswordsIconViews::ManagePasswordsIconViews(
CommandUpdater* updater,
PageActionIconView::Delegate* delegate)
: PageActionIconView(updater, IDC_MANAGE_PASSWORDS_FOR_PAGE, delegate),
state_(password_manager::ui::INACTIVE_STATE) {
: PageActionIconView(updater, IDC_MANAGE_PASSWORDS_FOR_PAGE, delegate) {
DCHECK(delegate);
#if defined(OS_MACOSX)
SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
#else
SetFocusBehavior(FocusBehavior::ALWAYS);
#endif
UpdateUiForState();
}
ManagePasswordsIconViews::~ManagePasswordsIconViews() {}
ManagePasswordsIconViews::~ManagePasswordsIconViews() = default;
void ManagePasswordsIconViews::SetState(password_manager::ui::State state) {
if (state_ == state)
......
......@@ -45,7 +45,7 @@ class ManagePasswordsIconViews : public ManagePasswordsIconView,
// Updates the UI to match |state_|.
void UpdateUiForState();
password_manager::ui::State state_;
password_manager::ui::State state_ = password_manager::ui::INACTIVE_STATE;
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIconViews);
};
......
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