Index: chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc |
index 4ab0eaccaef7eb50ea0bd7767a94b7dcdf443e81..58cef816fe33113aa4d25e0485295069dd52c4de 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc |
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc |
@@ -10,15 +10,11 @@ |
#include "chrome/browser/ui/view_ids.h" |
#include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
#include "components/password_manager/core/common/password_manager_ui.h" |
-#include "grit/generated_resources.h" |
-#include "grit/theme_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
ManagePasswordsIconView::ManagePasswordsIconView(CommandUpdater* updater) |
- : BubbleIconView(updater, IDC_MANAGE_PASSWORDS_FOR_PAGE), |
- icon_id_(0), |
- tooltip_text_id_(0) { |
+ : BubbleIconView(updater, IDC_MANAGE_PASSWORDS_FOR_PAGE) { |
set_id(VIEW_ID_MANAGE_PASSWORDS_ICON_BUTTON); |
SetAccessibilityFocusable(true); |
UpdateVisibleUI(); |
@@ -27,28 +23,13 @@ ManagePasswordsIconView::ManagePasswordsIconView(CommandUpdater* updater) |
ManagePasswordsIconView::~ManagePasswordsIconView() {} |
void ManagePasswordsIconView::UpdateVisibleUI() { |
- // If the icon is inactive: clear out it's image and tooltip, hide the icon, |
- // close any active bubble, and exit early. |
if (state() == password_manager::ui::INACTIVE_STATE) { |
- icon_id_ = 0; |
- tooltip_text_id_ = 0; |
- |
SetVisible(false); |
if (ManagePasswordsBubbleView::IsShowing()) |
ManagePasswordsBubbleView::CloseBubble(); |
return; |
} |
- // Otherwise, start with the correct values for MANAGE_STATE, and adjust |
- // things accordingly if we're either in BLACKLIST_STATE or PENDING_STATE. |
- icon_id_ = active() ? IDR_SAVE_PASSWORD_ACTIVE : IDR_SAVE_PASSWORD_INACTIVE; |
- tooltip_text_id_ = IDS_PASSWORD_MANAGER_TOOLTIP_MANAGE; |
- if (state() == password_manager::ui::BLACKLIST_STATE) |
- icon_id_ = active() ? IDR_SAVE_PASSWORD_DISABLED_ACTIVE |
- : IDR_SAVE_PASSWORD_DISABLED_INACTIVE; |
- else if (password_manager::ui::IsPendingState(state())) |
- tooltip_text_id_ = IDS_PASSWORD_MANAGER_TOOLTIP_SAVE; |
- |
SetVisible(true); |
SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_)); |
SetTooltipText(l10n_util::GetStringUTF16(tooltip_text_id_)); |