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

Unified Diff: ash/common/system/chromeos/audio/audio_detailed_view.cc

Issue 2803893002: Reuse the code within UpdateCheckMark() (Closed)
Patch Set: Rename CheckMark -> SetCheckMarkVisible, UncheckMark -> SetCheckMarkInvisible. Update the comment. 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
Index: ash/common/system/chromeos/audio/audio_detailed_view.cc
diff --git a/ash/common/system/chromeos/audio/audio_detailed_view.cc b/ash/common/system/chromeos/audio/audio_detailed_view.cc
index 4772e8a34931edbe3e4a691fa3969e2544c4934e..0ccc18d9ecf06f34f62905f5fb66b9d4feb4458c 100644
--- a/ash/common/system/chromeos/audio/audio_detailed_view.cc
+++ b/ash/common/system/chromeos/audio/audio_detailed_view.cc
@@ -6,6 +6,7 @@
#include "ash/common/system/tray/hover_highlight_view.h"
#include "ash/common/system/tray/tray_popup_utils.h"
+#include "ash/common/system/tray/tray_utils.h"
#include "ash/common/system/tray/tri_view.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
@@ -111,15 +112,9 @@ HoverHighlightView* AudioDetailedView::AddScrollListItem(
container->AddLabelRow(text);
if (checked) {
tdanderson 2017/04/06 17:52:09 nit: In general in the code base we avoid braces f
- gfx::ImageSkia check_mark =
- gfx::CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700);
- container->AddRightIcon(check_mark, check_mark.width());
- container->SetRightViewVisible(true);
- container->SetAccessiblityState(
- HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX);
+ SetCheckMarkVisible(container);
} else {
- container->SetAccessiblityState(
- HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
+ SetCheckMarkInvisible(container);
}
scroll_content()->AddChildView(container);

Powered by Google App Engine
This is Rietveld 408576698