Chromium Code Reviews| Index: ash/common/system/tray_accessibility.cc |
| diff --git a/ash/common/system/tray_accessibility.cc b/ash/common/system/tray_accessibility.cc |
| index 3d32c7a57d37432431a43fa19c0ab44f6ba91269..b5bb9a14437ea0d59ac72f58e96f195b20e0e646 100644 |
| --- a/ash/common/system/tray_accessibility.cc |
| +++ b/ash/common/system/tray_accessibility.cc |
| @@ -25,7 +25,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" |
|
tdanderson
2017/04/07 20:57:32
Thanks for keeping the #includes up to date! Most
|
| #include "ui/gfx/image/image.h" |
| #include "ui/gfx/paint_vector_icon.h" |
| #include "ui/resources/grit/ui_resources.h" |
| @@ -88,20 +87,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 { |
| @@ -300,7 +285,7 @@ HoverHighlightView* AccessibilityDetailedView::AddScrollListItem( |
| HoverHighlightView* container = new HoverHighlightView(this); |
| gfx::ImageSkia image = CreateVectorIcon(icon, kMenuIconColor); |
| container->AddIconAndLabel(image, text); |
| - UpdateCheckMark(container, checked); |
| + TrayPopupUtils::InitializeAsCheckableRow(container, checked); |
| scroll_content()->AddChildView(container); |
| return container; |
| } |
| @@ -310,9 +295,7 @@ HoverHighlightView* AccessibilityDetailedView::AddScrollListItemWithoutIcon( |
| bool checked) { |
| HoverHighlightView* container = new HoverHighlightView(this); |
| container->AddLabelRow(text); |
| - |
| - UpdateCheckMark(container, checked); |
| - |
| + TrayPopupUtils::InitializeAsCheckableRow(container, checked); |
| scroll_content()->AddChildView(container); |
| return container; |
| } |