| 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..56e0e68d237c81045c8872f6642193f71f608b45 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,20 @@ bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) {
|
| !Shell::Get()->session_controller()->IsInSecondaryLoginScreen();
|
| }
|
|
|
| +void TrayPopupUtils::InitializeAsCheckableRow(HoverHighlightView* container,
|
| + bool checked) {
|
| + gfx::ImageSkia check_mark =
|
| + CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700);
|
| + container->AddRightIcon(check_mark, check_mark.width());
|
| + UpdateCheckMarkVisibility(container, checked);
|
| +}
|
| +
|
| +void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container,
|
| + bool visible) {
|
| + container->SetRightViewVisible(visible);
|
| + container->SetAccessiblityState(
|
| + visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX
|
| + : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
|
| +}
|
| +
|
| } // namespace ash
|
|
|