Commit cf2d5c1f authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

MacViews: Add icon to audio playing/muted tabs in Window menu

Bug: 846796
Change-Id: I417702c78b1b5dec4914a9efbc0ec16e1d016de9
Reviewed-on: https://chromium-review.googlesource.com/1147148
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577335}
parent c27876f5
...@@ -1657,7 +1657,19 @@ bool BrowserView::CanActivate() const { ...@@ -1657,7 +1657,19 @@ bool BrowserView::CanActivate() const {
} }
base::string16 BrowserView::GetWindowTitle() const { base::string16 BrowserView::GetWindowTitle() const {
return browser_->GetWindowTitleForCurrentTab(true /* include_app_name */); base::string16 title =
browser_->GetWindowTitleForCurrentTab(true /* include_app_name */);
#if defined(OS_MACOSX)
TabAlertState state =
chrome::GetTabAlertStateForContents(GetActiveWebContents());
if (state == TabAlertState::AUDIO_PLAYING)
title = l10n_util::GetStringFUTF16(IDS_WINDOW_AUDIO_PLAYING_MAC, title,
base::WideToUTF16(L"\U0001F50A"));
else if (state == TabAlertState::AUDIO_MUTING)
title = l10n_util::GetStringFUTF16(IDS_WINDOW_AUDIO_MUTING_MAC, title,
base::WideToUTF16(L"\U0001F507"));
#endif
return title;
} }
base::string16 BrowserView::GetAccessibleWindowTitle() const { base::string16 BrowserView::GetAccessibleWindowTitle() const {
......
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