Chromium Code Reviews| Index: ash/common/system/tray/tray_utils.cc |
| diff --git a/ash/common/system/tray/tray_utils.cc b/ash/common/system/tray/tray_utils.cc |
| index 28299cc66e645f8aec1284a1fa6e5c8661a6dda9..83fa10c1fb04288434bd9e93b1686f240e8e357a 100644 |
| --- a/ash/common/system/tray/tray_utils.cc |
| +++ b/ash/common/system/tray/tray_utils.cc |
| @@ -4,7 +4,11 @@ |
| #include "ash/common/system/tray/tray_utils.h" |
| +#include "ash/common/system/tray/hover_highlight_view.h" |
| +#include "ash/resources/vector_icons/vector_icons.h" |
| +#include "ui/gfx/color_palette.h" |
| #include "ui/gfx/font_list.h" |
| +#include "ui/gfx/paint_vector_icon.h" |
| #include "ui/views/controls/label.h" |
| namespace ash { |
| @@ -17,4 +21,19 @@ void SetupLabelForTray(views::Label* label) { |
| gfx::FontList().Derive(2, gfx::Font::NORMAL, gfx::Font::Weight::MEDIUM)); |
| } |
| +void SetCheckMarkVisible(HoverHighlightView* container) { |
| + gfx::ImageSkia check_mark = |
| + CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700); |
| + container->AddRightIcon(check_mark, check_mark.width()); |
| + container->SetRightViewVisible(true); |
| + container->SetAccessiblityState( |
| + HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX); |
| +} |
| + |
| +void SetCheckMarkInvisible(HoverHighlightView* container) { |
| + container->SetRightViewVisible(false); |
| + container->SetAccessiblityState( |
| + HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); |
|
tdanderson
2017/04/06 17:52:09
The two new functions you have introduced here are
minch1
2017/04/06 18:05:47
The logic of enable and disable check mark in Comm
minch1
2017/04/06 18:09:41
Maybe I can add one more function here to combine
|
| +} |
| + |
| } // namespace ash |