Chromium Code Reviews| Index: ash/common/system/tray/tray_popup_utils.cc |
| diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc |
| index 98e9fdba649ad5ffd1d780d4afe582444fc3a423..46b4d43dd81150311aadec66b6507907160ee2ea 100644 |
| --- a/ash/common/system/tray/tray_popup_utils.cc |
| +++ b/ash/common/system/tray/tray_popup_utils.cc |
| @@ -11,6 +11,7 @@ |
| #include "ash/common/ash_view_ids.h" |
| #include "ash/common/session/session_controller.h" |
| #include "ash/common/system/tray/fixed_sized_image_view.h" |
| +#include "ash/common/system/tray/hover_highlight_view.h" |
| #include "ash/common/system/tray/size_range_layout.h" |
| #include "ash/common/system/tray/tray_constants.h" |
| #include "ash/common/system/tray/tray_popup_item_style.h" |
| @@ -18,6 +19,7 @@ |
| #include "ash/shell.h" |
| #include "base/memory/ptr_util.h" |
| #include "ui/base/l10n/l10n_util.h" |
| +#include "ui/gfx/color_palette.h" |
| #include "ui/gfx/paint_vector_icon.h" |
| #include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
| #include "ui/views/animation/ink_drop_highlight.h" |
| @@ -434,4 +436,19 @@ bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { |
| !Shell::Get()->session_controller()->IsInSecondaryLoginScreen(); |
| } |
| +void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container, |
|
tdanderson
2017/04/07 17:54:31
What do you think about splitting this into two he
|
| + 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 ash |