Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: ash/common/system/tray/tray_popup_utils.cc

Issue 2803893002: Reuse the code within UpdateCheckMark() (Closed)
Patch Set: Reuse the code within UpdateCheckMark(). Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.h ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.h ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698