Index: ash/common/system/tray_accessibility.cc |
diff --git a/ash/common/system/tray_accessibility.cc b/ash/common/system/tray_accessibility.cc |
index 47eb8fbf0cf4771ef45b380075233457e690d4b9..b39071afb5b19b6f6feabee8c110b2d3c0a9a933 100644 |
--- a/ash/common/system/tray_accessibility.cc |
+++ b/ash/common/system/tray_accessibility.cc |
@@ -17,6 +17,7 @@ |
#include "ash/common/system/tray/tray_item_more.h" |
#include "ash/common/system/tray/tray_popup_item_style.h" |
#include "ash/common/system/tray/tray_popup_utils.h" |
+#include "ash/common/system/tray/tray_utils.h" |
#include "ash/common/system/tray/tri_view.h" |
#include "ash/common/wm_shell.h" |
#include "ash/resources/vector_icons/vector_icons.h" |
@@ -25,7 +26,6 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
-#include "ui/gfx/color_palette.h" |
#include "ui/gfx/image/image.h" |
#include "ui/gfx/paint_vector_icon.h" |
#include "ui/resources/grit/ui_resources.h" |
@@ -89,20 +89,6 @@ LoginStatus GetCurrentLoginStatus() { |
return Shell::Get()->system_tray_delegate()->GetUserLoginStatus(); |
} |
-void UpdateCheckMark(HoverHighlightView* container, bool checked) { |
- if (checked) { |
- gfx::ImageSkia check_mark = |
- CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700); |
- container->AddRightIcon(check_mark, check_mark.width()); |
- container->SetRightViewVisible(true); |
- container->SetAccessiblityState( |
- HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX); |
- } else { |
- container->SetAccessiblityState( |
- HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); |
- } |
-} |
- |
} // namespace |
namespace tray { |
@@ -302,7 +288,11 @@ HoverHighlightView* AccessibilityDetailedView::AddScrollListItem( |
HoverHighlightView* container = new HoverHighlightView(this); |
gfx::ImageSkia image = CreateVectorIcon(icon, kMenuIconColor); |
container->AddIconAndLabel(image, text); |
- UpdateCheckMark(container, checked); |
+ if (checked) { |
+ SetCheckMarkVisible(container); |
+ } else { |
+ SetCheckMarkInvisible(container); |
+ } |
scroll_content()->AddChildView(container); |
return container; |
} |
@@ -313,7 +303,11 @@ HoverHighlightView* AccessibilityDetailedView::AddScrollListItemWithoutIcon( |
HoverHighlightView* container = new HoverHighlightView(this); |
container->AddLabelRow(text); |
- UpdateCheckMark(container, checked); |
+ if (checked) { |
+ SetCheckMarkVisible(container); |
+ } else { |
+ SetCheckMarkInvisible(container); |
+ } |
scroll_content()->AddChildView(container); |
return container; |