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

Unified Diff: ash/common/system/tray_accessibility.cc

Issue 2795143005: [Ash] Remove pre-MD code paths from HoverHighlightView (Closed)
Patch Set: 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/tray_accessibility.cc
diff --git a/ash/common/system/tray_accessibility.cc b/ash/common/system/tray_accessibility.cc
index 864027dc63ff02330d3c1b9ae269ee90f784e140..b2ec3687bca0c29fafe751ed7d18c737714b8c45 100644
--- a/ash/common/system/tray_accessibility.cc
+++ b/ash/common/system/tray_accessibility.cc
@@ -230,37 +230,32 @@ void AccessibilityDetailedView::AppendAccessibilityList() {
AccessibilityDelegate* delegate =
Shell::GetInstance()->accessibility_delegate();
spoken_feedback_enabled_ = delegate->IsSpokenFeedbackEnabled();
- spoken_feedback_view_ =
- AddScrollListItem(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK),
- spoken_feedback_enabled_, spoken_feedback_enabled_,
- kSystemMenuAccessibilityChromevoxIcon);
+ spoken_feedback_view_ = AddScrollListItem(
+ bundle.GetLocalizedString(
Evan Stade 2017/04/04 17:18:18 l10n_util::GetStringUTF16()
tdanderson 2017/04/04 18:45:06 Done.
+ IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK),
+ spoken_feedback_enabled_, kSystemMenuAccessibilityChromevoxIcon);
high_contrast_enabled_ = delegate->IsHighContrastEnabled();
high_contrast_view_ = AddScrollListItem(
bundle.GetLocalizedString(
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE),
- high_contrast_enabled_, high_contrast_enabled_,
- kSystemMenuAccessibilityContrastIcon);
+ high_contrast_enabled_, kSystemMenuAccessibilityContrastIcon);
screen_magnifier_enabled_ = delegate->IsMagnifierEnabled();
- screen_magnifier_view_ =
- AddScrollListItem(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER),
- screen_magnifier_enabled_, screen_magnifier_enabled_,
- kSystemMenuAccessibilityScreenMagnifierIcon);
+ screen_magnifier_view_ = AddScrollListItem(
+ bundle.GetLocalizedString(
+ IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER),
+ screen_magnifier_enabled_, kSystemMenuAccessibilityScreenMagnifierIcon);
autoclick_enabled_ = delegate->IsAutoclickEnabled();
autoclick_view_ = AddScrollListItem(
bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_ACCESSIBILITY_AUTOCLICK),
- autoclick_enabled_, autoclick_enabled_,
- kSystemMenuAccessibilityAutoClickIcon);
+ autoclick_enabled_, kSystemMenuAccessibilityAutoClickIcon);
virtual_keyboard_enabled_ = delegate->IsVirtualKeyboardEnabled();
virtual_keyboard_view_ =
AddScrollListItem(bundle.GetLocalizedString(
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD),
- virtual_keyboard_enabled_, virtual_keyboard_enabled_,
- kSystemMenuKeyboardIcon);
+ virtual_keyboard_enabled_, kSystemMenuKeyboardIcon);
scroll_content()->AddChildView(
TrayPopupUtils::CreateListSubHeaderSeparator());
@@ -303,18 +298,12 @@ void AccessibilityDetailedView::AppendAccessibilityList() {
HoverHighlightView* AccessibilityDetailedView::AddScrollListItem(
const base::string16& text,
- bool highlight,
bool checked,
const gfx::VectorIcon& icon) {
HoverHighlightView* container = new HoverHighlightView(this);
gfx::ImageSkia image = CreateVectorIcon(icon, kMenuIconColor);
- const int padding = (kMenuButtonSize - image.width()) / 2;
- container->AddIconAndLabelCustomSize(
- image, text, highlight, image.width() + kMenuSeparatorVerticalPadding * 2,
- padding, padding);
-
+ container->AddIconAndLabel(image, text);
UpdateCheckMark(container, checked);
-
scroll_content()->AddChildView(container);
return container;
}
@@ -323,7 +312,7 @@ HoverHighlightView* AccessibilityDetailedView::AddScrollListItemWithoutIcon(
const base::string16& text,
bool checked) {
HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabelRowMd(text);
+ container->AddLabelRow(text);
UpdateCheckMark(container, checked);
« ash/common/system/tray/hover_highlight_view.cc ('K') | « ash/common/system/tray_accessibility.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698