Commit 21ef90f1 authored by Noah Rose Ledesma's avatar Noah Rose Ledesma Committed by Commit Bot

Add tooltips to GMC skip and seek controls

The |accessible_name| passed to
MediaNotificationViewImpl::CreateMediaButton is now used as the tooltip
text.

Bug: 1047294
Change-Id: Ie60dff78aed15159d83ac1d5aa5192d2cf539207
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250881
Commit-Queue: Noah Rose Ledesma <noahrose@google.com>
Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779523}
parent 6d5a1711
......@@ -554,6 +554,7 @@ void MediaNotificationViewImpl::CreateMediaButton(
button->set_tag(static_cast<int>(action));
button->SetPreferredSize(kMediaButtonSize);
button->SetAccessibleName(accessible_name);
button->SetTooltipText(accessible_name);
button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
button_row_->AddChildView(std::move(button));
}
......
......@@ -98,7 +98,8 @@ class COMPONENT_EXPORT(MEDIA_MESSAGE_CENTER) MediaNotificationViewImpl
// Creates an image button with an icon that matches |action| and adds it
// to |button_row_|. When clicked it will trigger |action| on the session.
// |accessible_name| is the text used for screen readers.
// |accessible_name| is the text used for screen readers and the
// button's tooltip.
void CreateMediaButton(media_session::mojom::MediaSessionAction action,
const base::string16& accessible_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment